<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Repetier-Firmware: src/ArduinoAVR/Repetier/ui.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="repetier-logo-trans128.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Repetier-Firmware
   &#160;<span id="projectnumber">0.91</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ui_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">src/ArduinoAVR/Repetier/ui.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ui_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    This file is part of Repetier-Firmware.</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    Repetier-Firmware is free software: you can redistribute it and/or modify</span>
<a name="l00005"></a>00005 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00006"></a>00006 <span class="comment">    the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00007"></a>00007 <span class="comment">    (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    Repetier-Firmware is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00012"></a>00012 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00015"></a>00015 <span class="comment">    along with Repetier-Firmware.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef _ui_h</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define _ui_h</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="gcode_8h.html">gcode.h</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00025"></a>00025 <span class="comment">//                          Action codes</span>
<a name="l00026"></a>00026 <span class="comment">// 1-999     : Autorepeat</span>
<a name="l00027"></a>00027 <span class="comment">// 1000-1999 : Execute</span>
<a name="l00028"></a>00028 <span class="comment">// 2000-2999 : Write code</span>
<a name="l00029"></a>00029 <span class="comment">// 4000-4999 : Show menu</span>
<a name="l00030"></a>00030 <span class="comment">// Add UI_ACTION_TOPMENU to show a menu as top menu</span>
<a name="l00031"></a>00031 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00032"></a>00032 
<a name="l00033"></a><a class="code" href="ui_8h.html#a0376e7bd1683fa45972d1d56adba98a9">00033</a> <span class="preprocessor">#define UI_ACTION_TOPMENU 8192</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a><a class="code" href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">00035</a> <span class="preprocessor">#define UI_ACTION_NEXT 1</span>
<a name="l00036"></a><a class="code" href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PREVIOUS 2</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a><a class="code" href="ui_8h.html#a622fc8ab61db41c7c6e757a8ff7eec5f">00038</a> <span class="preprocessor">#define UI_ACTION_X_UP                 100</span>
<a name="l00039"></a><a class="code" href="ui_8h.html#a8690b243ec5d0dde903923e524e6ee68">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_X_DOWN               101</span>
<a name="l00040"></a><a class="code" href="ui_8h.html#ae862683e3ceecb61906a59badd42a6c7">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_Y_UP                 102</span>
<a name="l00041"></a><a class="code" href="ui_8h.html#a244ce005a688a49e3a4b2f1a9396f3f5">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_Y_DOWN               103</span>
<a name="l00042"></a><a class="code" href="ui_8h.html#a2d3c8282f91225976a4ef7f124184d40">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_Z_UP                 104</span>
<a name="l00043"></a><a class="code" href="ui_8h.html#ab5f4d84b80e3d4dfca2e13d5932e846e">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_Z_DOWN               105</span>
<a name="l00044"></a><a class="code" href="ui_8h.html#aec5068c25e627fe9a7df26d2c6b2c92d">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_UP          106</span>
<a name="l00045"></a><a class="code" href="ui_8h.html#a50b34120e709f3c8fe35705d15317998">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_DOWN        107</span>
<a name="l00046"></a><a class="code" href="ui_8h.html#a76022a3511e93f0f7ea97a78ef285418">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_TEMP_UP     108</span>
<a name="l00047"></a><a class="code" href="ui_8h.html#acee24d8ee9ba7c47daed8599d1cff21b">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_TEMP_DOWN   109</span>
<a name="l00048"></a><a class="code" href="ui_8h.html#a9d8b241be4a7077f60efa671e9eaeb86">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HEATED_BED_UP        110</span>
<a name="l00049"></a><a class="code" href="ui_8h.html#ade7a3858d4781b6625045217418f7a95">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HEATED_BED_DOWN      111</span>
<a name="l00050"></a><a class="code" href="ui_8h.html#abab4782fbe563a3fc9937e2114b64903">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_UP               112</span>
<a name="l00051"></a><a class="code" href="ui_8h.html#a3806dc02cc053954b9296afdb2950787">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_DOWN             113</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a><a class="code" href="ui_8h.html#a805b79beca32e71119c52596f35bb1cb">00053</a> <span class="preprocessor">#define UI_ACTION_DUMMY 10000</span>
<a name="l00054"></a><a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_BACK                  1000</span>
<a name="l00055"></a><a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_OK                    1001</span>
<a name="l00056"></a><a class="code" href="ui_8h.html#a2070560eee75ee64c166017f2ab1b377">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_UP               1002</span>
<a name="l00057"></a><a class="code" href="ui_8h.html#a6e01e30679f304370a534d86ef97eef3">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_TOP_MENU              1003</span>
<a name="l00058"></a><a class="code" href="ui_8h.html#ae56bdf8e572fecb23c86150c243ac2d3">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EMERGENCY_STOP        1004</span>
<a name="l00059"></a><a class="code" href="ui_8h.html#a1ef3f459468b52a38fe4fffc66354f74">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_XPOSITION             1005</span>
<a name="l00060"></a><a class="code" href="ui_8h.html#a04370ec777e6807e7065de53c629e793">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_YPOSITION             1006</span>
<a name="l00061"></a><a class="code" href="ui_8h.html#acf0eba931a353fa69913627edef83604">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_ZPOSITION             1007</span>
<a name="l00062"></a><a class="code" href="ui_8h.html#a2325a5f4d041db35d411006a860a3883">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EPOSITION             1008</span>
<a name="l00063"></a><a class="code" href="ui_8h.html#ac57997dd640de07147a142f179a35863">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_BED_TEMP              1009</span>
<a name="l00064"></a><a class="code" href="ui_8h.html#a56ec8720be0e3fe435bcfc19e3386063">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_TEMP         1010</span>
<a name="l00065"></a><a class="code" href="ui_8h.html#a2a15bc99a6efdb771264b83d7c883af2">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_DELETE             1012</span>
<a name="l00066"></a><a class="code" href="ui_8h.html#ae915626599ace17139e49669b86acb10">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_PRINT              1013</span>
<a name="l00067"></a><a class="code" href="ui_8h.html#a1c0b54a2f68567d607a6bc4dd5fce5b0">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_PAUSE              1014</span>
<a name="l00068"></a><a class="code" href="ui_8h.html#a97582b2bc3ba9ddb5d11d6ee38354b08">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_CONTINUE           1015</span>
<a name="l00069"></a><a class="code" href="ui_8h.html#a333a4ca9b7d54a3550b9adff25b0993f">00069</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_UNMOUNT            1016</span>
<a name="l00070"></a><a class="code" href="ui_8h.html#a166e19b9386c5b355af7031c1b734952">00070</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_MOUNT              1017</span>
<a name="l00071"></a><a class="code" href="ui_8h.html#a72a86a29358c20f85a4d8be9f31ceafa">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_XPOSITION_FAST        1018</span>
<a name="l00072"></a><a class="code" href="ui_8h.html#a3cf59357e508ee576f3739b7ae06d906">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_YPOSITION_FAST        1019</span>
<a name="l00073"></a><a class="code" href="ui_8h.html#a3717fb4a2b9df95fd1af1c875689e7fb">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_ZPOSITION_FAST        1020</span>
<a name="l00074"></a><a class="code" href="ui_8h.html#a5fd2d531eccf1d966c177a8e2e137ab7">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOME_ALL              1021</span>
<a name="l00075"></a><a class="code" href="ui_8h.html#a2433e70d06baefbf8cfd7c8f99c8e007">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOME_X                1022</span>
<a name="l00076"></a><a class="code" href="ui_8h.html#a29aab9c5095b45910ee54264425bd7cd">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOME_Y                1023</span>
<a name="l00077"></a><a class="code" href="ui_8h.html#a7149d15e66318376c0513a497b6eff8a">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOME_Z                1024</span>
<a name="l00078"></a><a class="code" href="ui_8h.html#adfce8a1d85293c67745cb022cce5c7ba">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SELECT_EXTRUDER1      1025</span>
<a name="l00079"></a><a class="code" href="ui_8h.html#ae092c04f456da231d3376b8f51365e95">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_STORE_EEPROM          1030</span>
<a name="l00080"></a><a class="code" href="ui_8h.html#a1e5b1992f0345cb6fd8a952f8a0e2d2c">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_LOAD_EEPROM           1031</span>
<a name="l00081"></a><a class="code" href="ui_8h.html#a4bf37c2a6e926488e87668781b2b709d">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PRINT_ACCEL_X         1032</span>
<a name="l00082"></a><a class="code" href="ui_8h.html#abd68f52a37ea81a391a45ca520a91c45">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PRINT_ACCEL_Y         1033</span>
<a name="l00083"></a><a class="code" href="ui_8h.html#a36f37dcd57ae22c697a50a436af59aa0">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PRINT_ACCEL_Z         1034</span>
<a name="l00084"></a><a class="code" href="ui_8h.html#a65bdb14d38489b883905c96aef935ee5">00084</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MOVE_ACCEL_X          1035</span>
<a name="l00085"></a><a class="code" href="ui_8h.html#a9c05362222b75dcd04be56542f331642">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MOVE_ACCEL_Y          1036</span>
<a name="l00086"></a><a class="code" href="ui_8h.html#a9b8724284841e555231e6886a6c62b8f">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MOVE_ACCEL_Z          1037</span>
<a name="l00087"></a><a class="code" href="ui_8h.html#a7b3050f0a1471a73651a7863ea1e4ea9">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_JERK              1038</span>
<a name="l00088"></a><a class="code" href="ui_8h.html#a9d6b89f35369c1b4fdb84708905437bb">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_ZJERK             1039</span>
<a name="l00089"></a><a class="code" href="ui_8h.html#a4ddc30066bc238f59422feaf451849b0">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_BAUDRATE              1040</span>
<a name="l00090"></a><a class="code" href="ui_8h.html#a547091dc11d9bf4547f19b22e6d362b0">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOMING_FEEDRATE_X     1041</span>
<a name="l00091"></a><a class="code" href="ui_8h.html#ab0ac9acb97f66442428592d8a3b5d0f3">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOMING_FEEDRATE_Y     1042</span>
<a name="l00092"></a><a class="code" href="ui_8h.html#a39531276f38d45095c5306dac4bc64dd">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HOMING_FEEDRATE_Z     1043</span>
<a name="l00093"></a><a class="code" href="ui_8h.html#a6a96117be59b0c25718c9e6a89b9943c">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_FEEDRATE_X        1044</span>
<a name="l00094"></a><a class="code" href="ui_8h.html#afe1892becafdf2145d5cba300e27242d">00094</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_FEEDRATE_Y        1045</span>
<a name="l00095"></a><a class="code" href="ui_8h.html#a5ed739b9200e6c6cc23ac3a85b5786be">00095</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_FEEDRATE_Z        1046</span>
<a name="l00096"></a><a class="code" href="ui_8h.html#a40cb611c4a97c725f655a78a380aff18">00096</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_STEPS_X               1047</span>
<a name="l00097"></a><a class="code" href="ui_8h.html#a6c7f89663a938efa2f2e88b1633f68b2">00097</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_STEPS_Y               1048</span>
<a name="l00098"></a><a class="code" href="ui_8h.html#a770c6c9be5a86468fc0b965a76e4a3b2">00098</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_STEPS_Z               1049</span>
<a name="l00099"></a><a class="code" href="ui_8h.html#a4789b7f832af1ac035c84a3fd6ef4f5f">00099</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_OFF               1050</span>
<a name="l00100"></a><a class="code" href="ui_8h.html#a36d49825cec962f3e93159dbb490f2a0">00100</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_25                1051</span>
<a name="l00101"></a><a class="code" href="ui_8h.html#a4b227957c35769c77549a5f02c6dfdfc">00101</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_50                1052</span>
<a name="l00102"></a><a class="code" href="ui_8h.html#a475cc074f97602819de4fc2efb80c885">00102</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_75                1053</span>
<a name="l00103"></a><a class="code" href="ui_8h.html#a4509616ec3148f1271cacb1477aa0549">00103</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FAN_FULL              1054</span>
<a name="l00104"></a><a class="code" href="ui_8h.html#a310358365ffe41b670cca7d3f98e733d">00104</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FEEDRATE_MULTIPLY     1055</span>
<a name="l00105"></a><a class="code" href="ui_8h.html#aa05409470afc017aef46b37f32e92167">00105</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_STEPPER_INACTIVE      1056</span>
<a name="l00106"></a><a class="code" href="ui_8h.html#a1011076579d4f8d1b4be612d40c866b5">00106</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MAX_INACTIVE          1057</span>
<a name="l00107"></a><a class="code" href="ui_8h.html#a033fb5ac159235091f7ff230169ca33d">00107</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PID_PGAIN             1058</span>
<a name="l00108"></a><a class="code" href="ui_8h.html#a3f2109847802269fa14fbef4567a8ce4">00108</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PID_IGAIN             1059</span>
<a name="l00109"></a><a class="code" href="ui_8h.html#a47afa2d7891048b835711e6e414b0863">00109</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PID_DGAIN             1060</span>
<a name="l00110"></a><a class="code" href="ui_8h.html#a97ef7b0f0bc0920cf888c483ece5f271">00110</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DRIVE_MIN             1061</span>
<a name="l00111"></a><a class="code" href="ui_8h.html#ad806dde8d455640c91749402918871cf">00111</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DRIVE_MAX             1062</span>
<a name="l00112"></a><a class="code" href="ui_8h.html#a9d9beaa3b44a5ab41831426eb4238c9d">00112</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_X_OFFSET              1063</span>
<a name="l00113"></a><a class="code" href="ui_8h.html#af9f4cf208904a281d9fe4016145ea1fa">00113</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_Y_OFFSET              1064</span>
<a name="l00114"></a><a class="code" href="ui_8h.html#a740c709475aa0bf2e55e5177bc77f197">00114</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_STEPS            1065</span>
<a name="l00115"></a><a class="code" href="ui_8h.html#a0a4400d560b9f9a5e9d109e6b9e216be">00115</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_ACCELERATION     1066</span>
<a name="l00116"></a><a class="code" href="ui_8h.html#aa2f7b85b27c04289b9a7f64844990d6d">00116</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_MAX_FEEDRATE     1067</span>
<a name="l00117"></a><a class="code" href="ui_8h.html#a4df68b19805b67688f32fee4e777288b">00117</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_START_FEEDRATE   1068</span>
<a name="l00118"></a><a class="code" href="ui_8h.html#a38eba0e0278e07eaf4e3f05eccddc913">00118</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_HEATMANAGER      1069</span>
<a name="l00119"></a><a class="code" href="ui_8h.html#a39607560ff6738d4f1985140ba05fd4f">00119</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_WATCH_PERIOD     1070</span>
<a name="l00120"></a><a class="code" href="ui_8h.html#a76ad73dc9254fa21155b6fee5807ef2c">00120</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PID_MAX               1071</span>
<a name="l00121"></a><a class="code" href="ui_8h.html#a571c1f102544b6a3052138868de57fd0">00121</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_ADVANCE_K             1072</span>
<a name="l00122"></a><a class="code" href="ui_8h.html#a1e389bcd2e902c281f9d97bf8d4655f8">00122</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SET_ORIGIN            1073</span>
<a name="l00123"></a><a class="code" href="ui_8h.html#ac57879041f8a45a08f703a7db618105f">00123</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DEBUG_ECHO            1074</span>
<a name="l00124"></a><a class="code" href="ui_8h.html#a8ea6a765cc13d2caac819fd3e18d0fbf">00124</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DEBUG_INFO            1075</span>
<a name="l00125"></a><a class="code" href="ui_8h.html#a2b24f10710a837997eb162f6587a58ea">00125</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DEBUG_ERROR           1076</span>
<a name="l00126"></a><a class="code" href="ui_8h.html#a023c69616d5a2403cbe94995466a1b01">00126</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DEBUG_DRYRUN          1077</span>
<a name="l00127"></a><a class="code" href="ui_8h.html#ac0d8ad4a8cdde1ceb5ca4725020acb4a">00127</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_POWER                 1078</span>
<a name="l00128"></a><a class="code" href="ui_8h.html#a80d482a904b1a1cb6b23d70d8bf9a571">00128</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PREHEAT_PLA           1079</span>
<a name="l00129"></a><a class="code" href="ui_8h.html#af7a46234f09be3ed3e66dd3b753a8831">00129</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_COOLDOWN              1080</span>
<a name="l00130"></a><a class="code" href="ui_8h.html#a43fe732a38b434e6a05576d9e7c1bfd0">00130</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HEATED_BED_OFF        1081</span>
<a name="l00131"></a><a class="code" href="ui_8h.html#a1551ca89187d0ce81da1b2939cdc0121">00131</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER0_OFF         1082</span>
<a name="l00132"></a><a class="code" href="ui_8h.html#a4764410b45bb2d4c6ee3dc7dd26d3322">00132</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER1_OFF         1083</span>
<a name="l00133"></a><a class="code" href="ui_8h.html#a5f408c78afe0f29a9a7284c6a6faa92d">00133</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_HEATED_BED_TEMP       1084</span>
<a name="l00134"></a><a class="code" href="ui_8h.html#a1867e8876ed9092d044533472a152eb7">00134</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER0_TEMP        1085</span>
<a name="l00135"></a><a class="code" href="ui_8h.html#ac57ab27009b68077ed5f07995578ab46">00135</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER1_TEMP        1086</span>
<a name="l00136"></a><a class="code" href="ui_8h.html#a88fd5ff92f8c9415719a4b6cf7c6fbc9">00136</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_OPS_OFF               1087</span>
<a name="l00137"></a><a class="code" href="ui_8h.html#ae2ee5826ab9108fa9e289e451ce89956">00137</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_OPS_CLASSIC           1088</span>
<a name="l00138"></a><a class="code" href="ui_8h.html#a60fc69c73ea3102791dd5c255f9e7ce0">00138</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_OPS_FAST              1089</span>
<a name="l00139"></a><a class="code" href="ui_8h.html#a8cb23d8ee81fe6d14b21f738b889beb4">00139</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_DISABLE_STEPPER       1090</span>
<a name="l00140"></a><a class="code" href="ui_8h.html#a1d79de1e2dd1e694c575477e1fb173a0">00140</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_RESET_EXTRUDER        1091</span>
<a name="l00141"></a><a class="code" href="ui_8h.html#ae53a458fedc79ccdbb221304726bdd9d">00141</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER_RELATIVE     1092</span>
<a name="l00142"></a><a class="code" href="ui_8h.html#ae4cb2baa1d3d0733a339a5c2e547d60b">00142</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SELECT_EXTRUDER0      1093</span>
<a name="l00143"></a><a class="code" href="ui_8h.html#ae86c06c1e30dd2fc413ed84d87f90ede">00143</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_ADVANCE_L             1094</span>
<a name="l00144"></a><a class="code" href="ui_8h.html#aa51b104e335f8782f4270949baa71622">00144</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PREHEAT_ABS           1095</span>
<a name="l00145"></a><a class="code" href="ui_8h.html#a938843b54d34aceb2edc0002d94428bf">00145</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FLOWRATE_MULTIPLY     1096</span>
<a name="l00146"></a><a class="code" href="ui_8h.html#a922589c78b8824436596bfc757092e75">00146</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_KILL                  1097</span>
<a name="l00147"></a><a class="code" href="ui_8h.html#a0cf0b3cff32d4b278642d3cd3d507871">00147</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_RESET                 1098</span>
<a name="l00148"></a><a class="code" href="ui_8h.html#aba3c0090e02cb672991fa458bb1070b5">00148</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_PAUSE                 1099</span>
<a name="l00149"></a><a class="code" href="ui_8h.html#ad363f46bc602ff96a3b0b11d3da8d295">00149</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_WAIT_RETRACT_TEMP 1100</span>
<a name="l00150"></a><a class="code" href="ui_8h.html#a1a52c11084dabbb7b766d5b93a5dfefe">00150</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTR_WAIT_RETRACT_UNITS 1101</span>
<a name="l00151"></a><a class="code" href="ui_8h.html#a0b123286e1bfa931c11f454b78b2006d">00151</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER2_OFF         1102</span>
<a name="l00152"></a><a class="code" href="ui_8h.html#a0ba8664ff1888002e1a7ebed8d05b07e">00152</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_EXTRUDER2_TEMP        1103</span>
<a name="l00153"></a><a class="code" href="ui_8h.html#aba6a0aa3f9e51a27f4779cf5af5b39ec">00153</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SELECT_EXTRUDER2      1104</span>
<a name="l00154"></a><a class="code" href="ui_8h.html#ad36dad0ea973bc92d734aab982080cfc">00154</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_WRITE_DEBUG           1105</span>
<a name="l00155"></a><a class="code" href="ui_8h.html#a66a327b69609069e29617759ce3e6143">00155</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_FANSPEED              1106</span>
<a name="l00156"></a><a class="code" href="ui_8h.html#aaa1ed14b72f52c8217062a8a3a9173f9">00156</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_LIGHTS_ONOFF          1107</span>
<a name="l00157"></a><a class="code" href="ui_8h.html#af3945b1a8d4d677d546f97db3b2abc60">00157</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SD_STOP               1108</span>
<a name="l00158"></a>00158 <span class="preprocessor"></span>
<a name="l00159"></a><a class="code" href="ui_8h.html#a79b955c3b7c81ec1ca901dcd8e4ad767">00159</a> <span class="preprocessor">#define UI_ACTION_MENU_XPOS             4000</span>
<a name="l00160"></a><a class="code" href="ui_8h.html#abe61f21ad6c2ea328ea829e247fc867e">00160</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_YPOS             4001</span>
<a name="l00161"></a><a class="code" href="ui_8h.html#a5c4651aaf24619b1356c28b280cb6615">00161</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_ZPOS             4002</span>
<a name="l00162"></a><a class="code" href="ui_8h.html#af80533b0c46b72ed95718c7e73dae1bd">00162</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_XPOSFAST         4003</span>
<a name="l00163"></a><a class="code" href="ui_8h.html#a1e4ec0a31bde6eb4f14ce4489c73298b">00163</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_YPOSFAST         4004</span>
<a name="l00164"></a><a class="code" href="ui_8h.html#acc1212e58df355a45b2a771763f4b611">00164</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_ZPOSFAST         4005</span>
<a name="l00165"></a><a class="code" href="ui_8h.html#ad47a9dfc7ec12e79953fd27b4bd6919e">00165</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_SDCARD           4006</span>
<a name="l00166"></a><a class="code" href="ui_8h.html#ab3d8752161348913470ede0ca42249f4">00166</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_QUICKSETTINGS    4007</span>
<a name="l00167"></a><a class="code" href="ui_8h.html#af5f27972b91aec3c713a79624f8c43a9">00167</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_EXTRUDER         4008</span>
<a name="l00168"></a><a class="code" href="ui_8h.html#a8b7577d468ba88db2cdaf41e1a85436c">00168</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_MENU_POSITIONS        4009</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span><span class="comment">//#define UI_ACTION_SHOW_MEASUREMENT            4010</span>
<a name="l00170"></a>00170 <span class="comment">//#define UI_ACTION_RESET_MEASUREMENT           4011</span>
<a name="l00171"></a><a class="code" href="ui_8h.html#ad7fab7c382026749ac75a0492d84aaf4">00171</a> <span class="preprocessor">#define UI_ACTION_SET_MEASURED_ORIGIN   4012</span>
<a name="l00172"></a><a class="code" href="ui_8h.html#a693488555117210dfb92b5107b69e903">00172</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SET_P1                                4013</span>
<a name="l00173"></a><a class="code" href="ui_8h.html#a5fb0bc18cb386a948340bef1f1f987c7">00173</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SET_P2                                4014</span>
<a name="l00174"></a><a class="code" href="ui_8h.html#a622537bbec4e41d52d948ee6f06b150b">00174</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SET_P3                                4015</span>
<a name="l00175"></a><a class="code" href="ui_8h.html#ac5613e988339f0454e89acf600509d9b">00175</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_CALC_LEVEL                    4016</span>
<a name="l00176"></a>00176 <span class="preprocessor"></span>
<a name="l00177"></a><a class="code" href="ui_8h.html#a786d54f3255d9481c6b1d76be61171e3">00177</a> <span class="preprocessor">#define UI_ACTION_SHOW_USERMENU1        4101</span>
<a name="l00178"></a><a class="code" href="ui_8h.html#a9e536ed5885eb836019c78f829c48e2e">00178</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU2        4102</span>
<a name="l00179"></a><a class="code" href="ui_8h.html#a4e3c0e389db5fd96e913198a3751b0a1">00179</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU3        4103</span>
<a name="l00180"></a><a class="code" href="ui_8h.html#a213aa0b8b81ff1fa4101c2b79a69e2a9">00180</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU4        4104</span>
<a name="l00181"></a><a class="code" href="ui_8h.html#a992f99ff61ba549fae0bd5ec5fa0797e">00181</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU5        4105</span>
<a name="l00182"></a><a class="code" href="ui_8h.html#ae2b27c2264bbb57562b501ddc30ec05e">00182</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU6        4106</span>
<a name="l00183"></a><a class="code" href="ui_8h.html#a96adb911a8e982083371cb9020bf1ead">00183</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU7        4107</span>
<a name="l00184"></a><a class="code" href="ui_8h.html#aba269f677175e0d4e1d568d4f75215d6">00184</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU8        4108</span>
<a name="l00185"></a><a class="code" href="ui_8h.html#a542accef6bd82a54a9284acf8d3188ff">00185</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU9        4109</span>
<a name="l00186"></a><a class="code" href="ui_8h.html#a17a6026f66f4bb34ce95aca43bbfc6ee">00186</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ACTION_SHOW_USERMENU10       4110</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span>
<a name="l00188"></a>00188 <span class="comment">// Load basic language definition to make sure all values are defined</span>
<a name="l00189"></a>00189 <span class="preprocessor">#include &quot;<a class="code" href="uilang_8h.html">uilang.h</a>&quot;</span>
<a name="l00190"></a>00190 
<a name="l00191"></a><a class="code" href="struct_u_i_menu_entry.html">00191</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00192"></a><a class="code" href="struct_u_i_menu_entry.html#a16343090e80c4472521560f30113d96c">00192</a>   <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="struct_u_i_menu_entry.html#a16343090e80c4472521560f30113d96c">text</a>; <span class="comment">// Menu text</span>
<a name="l00193"></a><a class="code" href="struct_u_i_menu_entry.html#af1bbc286a4bf3ca2406481cd4253312b">00193</a>   uint8_t <a class="code" href="struct_u_i_menu_entry.html#af1bbc286a4bf3ca2406481cd4253312b">menuType</a>; <span class="comment">// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command, 4 = modify action command</span>
<a name="l00194"></a><a class="code" href="struct_u_i_menu_entry.html#aa2af53713137e5f082918dd4c1023bf5">00194</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_u_i_menu_entry.html#aa2af53713137e5f082918dd4c1023bf5">action</a>; <span class="comment">// must be int so it gets 32 bit on arm!</span>
<a name="l00195"></a><a class="code" href="struct_u_i_menu_entry.html#aa69d890d38e8a1abafc8697d1760bb04">00195</a>   uint8_t <a class="code" href="struct_u_i_menu_entry.html#aa69d890d38e8a1abafc8697d1760bb04">filter</a>; <span class="comment">// allows dynamic menu filtering based on Printer::menuMode bits set.</span>
<a name="l00196"></a><a class="code" href="struct_u_i_menu_entry.html#a628840ea375f7362131e6919ab4cbc5e">00196</a>   uint8_t <a class="code" href="struct_u_i_menu_entry.html#a628840ea375f7362131e6919ab4cbc5e">nofilter</a>; <span class="comment">// Hide if one of these bits are set</span>
<a name="l00197"></a>00197   <span class="keywordtype">bool</span> showEntry() <span class="keyword">const</span>;
<a name="l00198"></a>00198 } <span class="keyword">const</span> <a class="code" href="struct_u_i_menu_entry.html">UIMenuEntry</a>;
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="struct_u_i_menu.html">00200</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00201"></a>00201   <span class="comment">// 0 = info page</span>
<a name="l00202"></a>00202   <span class="comment">// 1 = file selector</span>
<a name="l00203"></a>00203   <span class="comment">// 2 = submenu</span>
<a name="l00204"></a>00204   <span class="comment">// 3 = modififaction menu</span>
<a name="l00205"></a><a class="code" href="struct_u_i_menu.html#abe780536c31ff5db0168630df52b840a">00205</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="struct_u_i_menu.html#abe780536c31ff5db0168630df52b840a">menuType</a>;
<a name="l00206"></a><a class="code" href="struct_u_i_menu.html#a7441ef0865bcb3db9b8064dd7375c1ea">00206</a>   <span class="keywordtype">int</span> <a class="code" href="struct_u_i_menu.html#a7441ef0865bcb3db9b8064dd7375c1ea">id</a>; <span class="comment">// Type of modification</span>
<a name="l00207"></a><a class="code" href="struct_u_i_menu.html#a75b15f0e26b4ccf3195772b134b660ec">00207</a>   <span class="keywordtype">int</span> <a class="code" href="struct_u_i_menu.html#a75b15f0e26b4ccf3195772b134b660ec">numEntries</a>;
<a name="l00208"></a><a class="code" href="struct_u_i_menu.html#a22d5a03ad6075b65e955196937e7f6ad">00208</a>   <span class="keyword">const</span> <a class="code" href="struct_u_i_menu_entry.html">UIMenuEntry</a> * <span class="keyword">const</span> * <a class="code" href="struct_u_i_menu.html#a22d5a03ad6075b65e955196937e7f6ad">entries</a>;
<a name="l00209"></a>00209 } <span class="keyword">const</span> <a class="code" href="struct_u_i_menu.html">UIMenu</a>;
<a name="l00210"></a>00210 <span class="keyword">extern</span> <span class="keyword">const</span> int8_t encoder_table[16] <a class="code" href="u8glib__ex_8h.html#a75acaba9e781937468d0911423bc0c35">PROGMEM</a> ;
<a name="l00211"></a>00211 
<a name="l00212"></a>00212 <span class="comment">//#ifdef COMPILE_I2C_DRIVER</span>
<a name="l00213"></a>00213 
<a name="l00214"></a>00214 <span class="comment">/*************************************************************************</span>
<a name="l00215"></a>00215 <span class="comment">* Title:    C include file for the I2C master interface</span>
<a name="l00216"></a>00216 <span class="comment">*           (i2cmaster.S or twimaster.c)</span>
<a name="l00217"></a>00217 <span class="comment">* Author:   Peter Fleury &lt;pfleury@gmx.ch&gt;  http://jump.to/fleury</span>
<a name="l00218"></a>00218 <span class="comment">* File:     $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $</span>
<a name="l00219"></a>00219 <span class="comment">* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3</span>
<a name="l00220"></a>00220 <span class="comment">* Target:   any AVR device</span>
<a name="l00221"></a>00221 <span class="comment">* Usage:    see Doxygen manual</span>
<a name="l00222"></a>00222 <span class="comment">**************************************************************************/</span>
<a name="l00223"></a>00223 
<a name="l00224"></a>00224 
<a name="l00225"></a>00225 
<a name="l00226"></a>00226 
<a name="l00227"></a>00227 
<a name="l00228"></a>00228 <span class="comment">//extern const int matrixActions[] PROGMEM;</span>
<a name="l00229"></a>00229 <span class="comment">// Key codes</span>
<a name="l00230"></a><a class="code" href="ui_8h.html#a4b401e8097f3cf841db33914755bad3a">00230</a> <span class="preprocessor">#define UI_KEYS_INIT_CLICKENCODER_LOW(pinA,pinB) SET_INPUT(pinA);SET_INPUT(pinB); PULLUP(pinA,HIGH);PULLUP(pinB,HIGH);</span>
<a name="l00231"></a><a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">00231</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_INIT_BUTTON_LOW(pin) SET_INPUT(pin);PULLUP(pin,HIGH);</span>
<a name="l00232"></a><a class="code" href="ui_8h.html#aa6127966504963e917f79dcc3295e2cc">00232</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_INIT_CLICKENCODER_HIGH(pinA,pinB) SET_INPUT(pinA);SET_INPUT(pinB); PULLUP(pinA,LOW);PULLUP(pinB,LOW);</span>
<a name="l00233"></a><a class="code" href="ui_8h.html#a2cad5ab6586817b20fb57e492a43240d">00233</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_INIT_BUTTON_HIGH(pin) SET_INPUT(pin);PULLUP(pin,LOW);</span>
<a name="l00234"></a>00234 <span class="preprocessor"></span>
<a name="l00235"></a><a class="code" href="ui_8h.html#aedc513dd0e6a836b54ea50616aa25e65">00235</a> <span class="preprocessor">#define UI_KEYS_CLICKENCODER_LOW(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (!READ(pinA)) uid.encoderLast |=2;if (!READ(pinB)) uid.encoderLast |=1; uid.encoderPos += pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00236"></a><a class="code" href="ui_8h.html#a57f3db99b2afc7b9d7227972813038a7">00236</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_CLICKENCODER_LOW_REV(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (!READ(pinA)) uid.encoderLast |=2;if (!READ(pinB)) uid.encoderLast |=1; uid.encoderPos -= pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00237"></a><a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">00237</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_BUTTON_LOW(pin,action_) if(READ(pin)==0) action=action_;</span>
<a name="l00238"></a><a class="code" href="ui_8h.html#a56d431708c86453734619385e352d9e8">00238</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_CLICKENCODER_HIGH(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (READ(pinA)) uid.encoderLast |=2;if (READ(pinB)) uid.encoderLast |=1; uid.encoderPos += pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00239"></a><a class="code" href="ui_8h.html#a345c8765ca5d91f7ab6f0fc08f32d4b5">00239</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_CLICKENCODER_HIGH_REV(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (READ(pinA)) uid.encoderLast |=2;if (READ(pinB)) uid.encoderLast |=1; uid.encoderPos -= pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00240"></a><a class="code" href="ui_8h.html#afba3192129b28111943e9cae8a263190">00240</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_BUTTON_HIGH(pin,action_) if(READ(pin)!=0) action=action_;</span>
<a name="l00241"></a><a class="code" href="ui_8h.html#af496300ebe427dab69bfc047f80c57cc">00241</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_INIT_MATRIX(r1,r2,r3,r4,c1,c2,c3,c4) if(c1&gt;=0){SET_INPUT(c1);WRITE(c1,HIGH);}if(c2&gt;=0){SET_INPUT(c2);WRITE(c2,HIGH);}if(c3&gt;=0){SET_INPUT(c3);WRITE(c3,HIGH);}\</span>
<a name="l00242"></a>00242 <span class="preprocessor">    if(c4&gt;=0) {SET_INPUT(c4);WRITE(c4,HIGH);}if(r1&gt;=0)SET_OUTPUT(r1);if(r2&gt;=0)SET_OUTPUT(r2);if(r3&gt;=0)SET_OUTPUT(r3);if(r4&gt;=0)SET_OUTPUT(r4);\</span>
<a name="l00243"></a>00243 <span class="preprocessor">    if(r1&gt;=0)WRITE(r1,LOW);if(r2&gt;=0)WRITE(r2,LOW);if(r3&gt;=0)WRITE(r3,LOW);if(r4&gt;=0)WRITE(r4,LOW);</span>
<a name="l00244"></a>00244 <span class="preprocessor"></span><span class="comment">//      out.print_int_P(PSTR(&quot;r4=&gt;c1:&quot;),READ(c1));out.print_int_P(PSTR(&quot; c2:&quot;),READ(c2));out.print_int_P(PSTR(&quot; c3:&quot;),READ(c3));out.println_int_P(PSTR(&quot; c4:&quot;),READ(c4));</span>
<a name="l00245"></a><a class="code" href="ui_8h.html#a166ed74e7db93e7b2e1886bad952daa6">00245</a> <span class="preprocessor">#define UI_KEYS_MATRIX(r1,r2,r3,r4,c1,c2,c3,c4) {uint8_t r = (c1&gt;=0?READ(c1):0) &amp;&amp; (c2&gt;=0?READ(c2):0) &amp;&amp; (c3&gt;=0?READ(c3):0) &amp;&amp; (c4&gt;=0?READ(c4):0);\</span>
<a name="l00246"></a>00246 <span class="preprocessor">    if(!r) {\</span>
<a name="l00247"></a>00247 <span class="preprocessor">      r = 255;\</span>
<a name="l00248"></a>00248 <span class="preprocessor">      if(r2&gt;=0)WRITE(r2,HIGH);if(r3&gt;=0)WRITE(r3,HIGH);if(r4&gt;=0)WRITE(r4,HIGH);\</span>
<a name="l00249"></a>00249 <span class="preprocessor">      if(r1&gt;=0) {\</span>
<a name="l00250"></a>00250 <span class="preprocessor">        asm volatile (&quot;nop\nnop\nnop\nnop\nnop&quot;);\</span>
<a name="l00251"></a>00251 <span class="preprocessor">        if(!((c1&gt;=0?READ(c1):1) &amp;&amp; (c2&gt;=0?READ(c2):1) &amp;&amp; (c3&gt;=0?READ(c3):1) &amp;&amp; (c4&gt;=0?READ(c4):1))) r = 0;\</span>
<a name="l00252"></a>00252 <span class="preprocessor">        else WRITE(r1,HIGH);\</span>
<a name="l00253"></a>00253 <span class="preprocessor">      }\</span>
<a name="l00254"></a>00254 <span class="preprocessor">      if(r==255 &amp;&amp; r2&gt;=0) {\</span>
<a name="l00255"></a>00255 <span class="preprocessor">        WRITE(r2,LOW);asm volatile (&quot;nop\nnop\nnop\nnop\nnop&quot;);\</span>
<a name="l00256"></a>00256 <span class="preprocessor">        if(!((c1&gt;=0?READ(c1):1) &amp;&amp; (c2&gt;=0?READ(c2):1) &amp;&amp; (c3&gt;=0?READ(c3):1) &amp;&amp; (c4&gt;=0?READ(c4):1))) r = 4;\</span>
<a name="l00257"></a>00257 <span class="preprocessor">        else WRITE(r2,HIGH);\</span>
<a name="l00258"></a>00258 <span class="preprocessor">      }\</span>
<a name="l00259"></a>00259 <span class="preprocessor">      if(r==255 &amp;&amp; r3&gt;=0) {\</span>
<a name="l00260"></a>00260 <span class="preprocessor">        WRITE(r3,LOW);asm volatile (&quot;nop\nnop\nnop\nnop\nnop&quot;);\</span>
<a name="l00261"></a>00261 <span class="preprocessor">        if(!((c1&gt;=0?READ(c1):0) &amp;&amp; (c2&gt;=0?READ(c2):1) &amp;&amp; (c3&gt;=0?READ(c3):1) &amp;&amp; (c4&gt;=0?READ(c4):1))) r = 8;\</span>
<a name="l00262"></a>00262 <span class="preprocessor">        else WRITE(r3,HIGH);\</span>
<a name="l00263"></a>00263 <span class="preprocessor">      }\</span>
<a name="l00264"></a>00264 <span class="preprocessor">      if(r==255 &amp;&amp; r4&gt;=0) {\</span>
<a name="l00265"></a>00265 <span class="preprocessor">        WRITE(r4,LOW);asm volatile (&quot;nop\nnop\nnop\nnop\nnop&quot;);\</span>
<a name="l00266"></a>00266 <span class="preprocessor">        if(!((c1&gt;=0?READ(c1):1) &amp;&amp; (c2&gt;=0?READ(c2):1) &amp;&amp; (c3&gt;=0?READ(c3):1) &amp;&amp; (c4&gt;=0?READ(c4):1))) r = 12;\</span>
<a name="l00267"></a>00267 <span class="preprocessor">        else WRITE(r4,HIGH);\</span>
<a name="l00268"></a>00268 <span class="preprocessor">      }\</span>
<a name="l00269"></a>00269 <span class="preprocessor">      if(c2&gt;=0 &amp;&amp; !READ(c2)) r+=1;\</span>
<a name="l00270"></a>00270 <span class="preprocessor">      else if(c3&gt;=0 &amp;&amp; !READ(c3)) r+=2;\</span>
<a name="l00271"></a>00271 <span class="preprocessor">      else if(c4&gt;=0 &amp;&amp; !READ(c4)) r+=3;\</span>
<a name="l00272"></a>00272 <span class="preprocessor">      if(r&lt;16) {action = pgm_read_word(&amp;(matrixActions[r]));}\</span>
<a name="l00273"></a>00273 <span class="preprocessor">    }if(r1&gt;=0)WRITE(r1,LOW);if(r2&gt;=0)WRITE(r2,LOW);if(r3&gt;=0)WRITE(r3,LOW);if(r4&gt;=0)WRITE(r4,LOW);}</span>
<a name="l00274"></a>00274 <span class="preprocessor"></span><span class="comment">// I2C keymask tests</span>
<a name="l00275"></a><a class="code" href="ui_8h.html#a7dbb52d72771e00c7d8909b7e6f0a53f">00275</a> <span class="preprocessor">#define UI_KEYS_I2C_CLICKENCODER_LOW(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (!(keymask &amp; pinA)) uid.encoderLast |=2;if (!(keymask &amp; pinB)) uid.encoderLast |=1; uid.encoderPos += pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00276"></a><a class="code" href="ui_8h.html#a767f01eb8f4686b2493c21788aa03c60">00276</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_I2C_CLICKENCODER_LOW_REV(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (!(keymask &amp; pinA)) uid.encoderLast |=2;if (!(keymask &amp; pinB)) uid.encoderLast |=1; uid.encoderPos -= pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00277"></a><a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">00277</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_I2C_BUTTON_LOW(pin,action_) if((keymask &amp; pin)==0) action=action_;</span>
<a name="l00278"></a><a class="code" href="ui_8h.html#a9af0dd219ad8dfd0c4a4ebbd5ca6f97d">00278</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_I2C_CLICKENCODER_HIGH(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (keymask &amp; pinA) uid.encoderLast |=2;if (keymask &amp; pinB) uid.encoderLast |=1; uid.encoderPos += pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00279"></a><a class="code" href="ui_8h.html#ae3c0daaa271a44c71b8814daeff269dc">00279</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_I2C_CLICKENCODER_HIGH_REV(pinA,pinB)  uid.encoderLast = (uid.encoderLast &lt;&lt; 2) &amp; 0x0F;if (keymask &amp; pinA) uid.encoderLast |=2;if (keymask &amp; pinB) uid.encoderLast |=1; uid.encoderPos -= pgm_read_byte(&amp;encoder_table[uid.encoderLast]);</span>
<a name="l00280"></a><a class="code" href="ui_8h.html#a486ffeb5fcf2838026865c45e96c1cf1">00280</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_KEYS_I2C_BUTTON_HIGH(pin,action_) if((pin &amp; keymask)!=0) action=action_;</span>
<a name="l00281"></a>00281 <span class="preprocessor"></span>
<a name="l00282"></a><a class="code" href="ui_8h.html#a0a2ccd60d544596e4de1f7f3ef6323e1">00282</a> <span class="preprocessor">#define UI_STRING(name,text) const char PROGMEM name[] = text;</span>
<a name="l00283"></a>00283 <span class="preprocessor"></span>
<a name="l00284"></a><a class="code" href="ui_8h.html#a8d2e26b179b21e0e747cca5a967edf28">00284</a> <span class="preprocessor">#define UI_PAGE6(name,row1,row2,row3,row4,row5,row6) UI_STRING(name ## _1txt,row1);UI_STRING(name ## _2txt,row2);UI_STRING(name ## _3txt,row3);UI_STRING(name ## _4txt,row4);UI_STRING(name ## _5txt,row5);UI_STRING(name ## _6txt,row6);\</span>
<a name="l00285"></a>00285 <span class="preprocessor">   UIMenuEntry name ## _1 PROGMEM ={name ## _1txt,0,0,0,0};\</span>
<a name="l00286"></a>00286 <span class="preprocessor">   UIMenuEntry name ## _2 PROGMEM ={name ## _2txt,0,0,0,0};\</span>
<a name="l00287"></a>00287 <span class="preprocessor">   UIMenuEntry name ## _3 PROGMEM ={name ## _3txt,0,0,0,0};\</span>
<a name="l00288"></a>00288 <span class="preprocessor">   UIMenuEntry name ## _4 PROGMEM ={name ## _4txt,0,0,0,0};\</span>
<a name="l00289"></a>00289 <span class="preprocessor">   UIMenuEntry name ## _5 PROGMEM ={name ## _5txt,0,0,0,0};\</span>
<a name="l00290"></a>00290 <span class="preprocessor">   UIMenuEntry name ## _6 PROGMEM ={name ## _6txt,0,0,0,0};\</span>
<a name="l00291"></a>00291 <span class="preprocessor">   const UIMenuEntry * const name ## _entries [] PROGMEM = {&amp;name ## _1,&amp;name ## _2,&amp;name ## _3,&amp;name ## _4,&amp;name ## _5,&amp;name ## _6};\</span>
<a name="l00292"></a>00292 <span class="preprocessor">   const UIMenu name PROGMEM = {0,0,6,name ## _entries};</span>
<a name="l00293"></a><a class="code" href="ui_8h.html#aa25ae57174e654c5c056f98f16ceda8b">00293</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_PAGE4(name,row1,row2,row3,row4) UI_STRING(name ## _1txt,row1);UI_STRING(name ## _2txt,row2);UI_STRING(name ## _3txt,row3);UI_STRING(name ## _4txt,row4);\</span>
<a name="l00294"></a>00294 <span class="preprocessor">  UIMenuEntry name ## _1 PROGMEM ={name ## _1txt,0,0,0,0};\</span>
<a name="l00295"></a>00295 <span class="preprocessor">  UIMenuEntry name ## _2 PROGMEM ={name ## _2txt,0,0,0,0};\</span>
<a name="l00296"></a>00296 <span class="preprocessor">  UIMenuEntry name ## _3 PROGMEM ={name ## _3txt,0,0,0,0};\</span>
<a name="l00297"></a>00297 <span class="preprocessor">  UIMenuEntry name ## _4 PROGMEM ={name ## _4txt,0,0,0,0};\</span>
<a name="l00298"></a>00298 <span class="preprocessor">  const UIMenuEntry * const name ## _entries [] PROGMEM = {&amp;name ## _1,&amp;name ## _2,&amp;name ## _3,&amp;name ## _4};\</span>
<a name="l00299"></a>00299 <span class="preprocessor">  const UIMenu name PROGMEM = {0,0,4,name ## _entries};</span>
<a name="l00300"></a><a class="code" href="ui_8h.html#a5ed7410ee8d5eeab0f2a51dde4a223f4">00300</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_PAGE2(name,row1,row2) UI_STRING(name ## _1txt,row1);UI_STRING(name ## _2txt,row2);\</span>
<a name="l00301"></a>00301 <span class="preprocessor">  UIMenuEntry name ## _1 PROGMEM ={name ## _1txt,0,0,0,0};\</span>
<a name="l00302"></a>00302 <span class="preprocessor">  UIMenuEntry name ## _2 PROGMEM ={name ## _2txt,0,0,0,0};\</span>
<a name="l00303"></a>00303 <span class="preprocessor">  const UIMenuEntry * const name ## _entries[] PROGMEM = {&amp;name ## _1,&amp;name ## _2};\</span>
<a name="l00304"></a>00304 <span class="preprocessor">  const UIMenu name PROGMEM = {0,0,2,name ## _entries};</span>
<a name="l00305"></a><a class="code" href="ui_8h.html#a39920f8080f4df1704bdf3775b999b02">00305</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTION4C(name,action,rows) UI_MENU_ACTION4(name,action,rows)</span>
<a name="l00306"></a><a class="code" href="ui_8h.html#aaa804117ecf24350f5b67ba03e4563cc">00306</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTION2C(name,action,rows) UI_MENU_ACTION2(name,action,rows)</span>
<a name="l00307"></a><a class="code" href="ui_8h.html#aec127ba9cc1c38346dc5d9059948108c">00307</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTION4(name,action,row1,row2,row3,row4) UI_STRING(name ## _1txt,row1);UI_STRING(name ## _2txt,row2);UI_STRING(name ## _3txt,row3);UI_STRING(name ## _4txt,row4);\</span>
<a name="l00308"></a>00308 <span class="preprocessor">  UIMenuEntry name ## _1 PROGMEM ={name ## _1txt,0,0,0,0};\</span>
<a name="l00309"></a>00309 <span class="preprocessor">  UIMenuEntry name ## _2 PROGMEM ={name ## _2txt,0,0,0,0};\</span>
<a name="l00310"></a>00310 <span class="preprocessor">  UIMenuEntry name ## _3 PROGMEM ={name ## _3txt,0,0,0,0};\</span>
<a name="l00311"></a>00311 <span class="preprocessor">  UIMenuEntry name ## _4 PROGMEM ={name ## _4txt,0,0,0,0};\</span>
<a name="l00312"></a>00312 <span class="preprocessor">  const UIMenuEntry * const name ## _entries[] PROGMEM = {&amp;name ## _1,&amp;name ## _2,&amp;name ## _3,&amp;name ## _4};\</span>
<a name="l00313"></a>00313 <span class="preprocessor">  const UIMenu name PROGMEM = {3,action,4,name ## _entries};</span>
<a name="l00314"></a><a class="code" href="ui_8h.html#ac8bfa72ab35ed4b111100107c520a794">00314</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTION2(name,action,row1,row2) UI_STRING(name ## _1txt,row1);UI_STRING(name ## _2txt,row2);\</span>
<a name="l00315"></a>00315 <span class="preprocessor">  UIMenuEntry name ## _1 PROGMEM ={name ## _1txt,0,0,0,0};\</span>
<a name="l00316"></a>00316 <span class="preprocessor">  UIMenuEntry name ## _2 PROGMEM ={name ## _2txt,0,0,0,0};\</span>
<a name="l00317"></a>00317 <span class="preprocessor">  const UIMenuEntry * const name ## _entries[] PROGMEM = {&amp;name ## _1,&amp;name ## _2};\</span>
<a name="l00318"></a>00318 <span class="preprocessor">  const UIMenu name PROGMEM = {3,action,2,name ## _entries};</span>
<a name="l00319"></a><a class="code" href="ui_8h.html#af171b18200b67ab1d528143c4a19710f">00319</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_HEADLINE(name,text) UI_STRING(name ## _txt,text);UIMenuEntry name PROGMEM = {name ## _txt,1,0,0,0};</span>
<a name="l00320"></a><a class="code" href="ui_8h.html#ad5dc725d925d79ce24c578360b5be912">00320</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_CHANGEACTION(name,row,action) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,4,action,0,0};</span>
<a name="l00321"></a><a class="code" href="ui_8h.html#abfa9c15593e23b92dfa7cd274c4e9349">00321</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTIONCOMMAND(name,row,action) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,3,action,0,0};</span>
<a name="l00322"></a><a class="code" href="ui_8h.html#ade18a00948d3e403812e437e996dae15">00322</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTIONSELECTOR(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&amp;entries,0,0};</span>
<a name="l00323"></a><a class="code" href="ui_8h.html#a31790e5ac14ae52c67b58c96f4fcf807">00323</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_SUBMENU(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&amp;entries,0,0};</span>
<a name="l00324"></a><a class="code" href="ui_8h.html#a76e4d96a50e7dc744bba3c7ba96cf8ce">00324</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_CHANGEACTION_FILTER(name,row,action,filter,nofilter) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,4,action,filter,nofilter};</span>
<a name="l00325"></a><a class="code" href="ui_8h.html#af6e4109b52de956d560c505157594baf">00325</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTIONCOMMAND_FILTER(name,row,action,filter,nofilter) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,3,action,filter,nofilter};</span>
<a name="l00326"></a><a class="code" href="ui_8h.html#afe2ae4505aa5574c02a640f5f42ca3de">00326</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_ACTIONSELECTOR_FILTER(name,row,entries,filter,nofilter) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&amp;entries,filter,nofilter};</span>
<a name="l00327"></a><a class="code" href="ui_8h.html#acbbb6df751d2280a708782446cf9f814">00327</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_SUBMENU_FILTER(name,row,entries,filter,nofilter) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&amp;entries,filter,nofilter};</span>
<a name="l00328"></a><a class="code" href="ui_8h.html#a6c387ba3eae79ffc62c97651dde10db5">00328</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {2,0,itemsCnt,name ## _entries}</span>
<a name="l00329"></a><a class="code" href="ui_8h.html#adff5eb981bb16aee813dad51aad971a5">00329</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MENU_FILESELECT(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {1,0,itemsCnt,name ## _entries}</span>
<a name="l00330"></a>00330 <span class="preprocessor"></span>
<a name="l00331"></a>00331 <span class="preprocessor">#if FEATURE_CONTROLLER==2 || FEATURE_CONTROLLER==10 || FEATURE_CONTROLLER==11 // reprapdiscount smartcontroller has a sd card buildin</span>
<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#undef SDCARDDETECT</span>
<a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#define SDCARDDETECT 49</span>
<a name="l00334"></a>00334 <span class="preprocessor"></span><span class="preprocessor">#undef SDCARDDETECTINVERTED</span>
<a name="l00335"></a>00335 <span class="preprocessor"></span><span class="preprocessor">#define SDCARDDETECTINVERTED false</span>
<a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#undef SDSUPPORT</span>
<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define SDSUPPORT true</span>
<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00339"></a>00339 <span class="preprocessor"></span>
<a name="l00340"></a>00340 <span class="comment">// Maximum size of a row - if row is larger, text gets scrolled</span>
<a name="l00341"></a><a class="code" href="ui_8h.html#a551f71f92f90f76151a3cfc9679271a0">00341</a> <span class="preprocessor">#define MAX_COLS 28</span>
<a name="l00342"></a>00342 <span class="preprocessor"></span>
<a name="l00343"></a><a class="code" href="class_u_i_display.html">00343</a> <span class="keyword">class </span><a class="code" href="class_u_i_display.html">UIDisplay</a> {
<a name="l00344"></a>00344   <span class="keyword">public</span>:
<a name="l00345"></a><a class="code" href="class_u_i_display.html#a27ac1730f3c9b0d5935ac0c406f7b9f3">00345</a>     <span class="keyword">volatile</span> uint8_t <a class="code" href="class_u_i_display.html#a27ac1730f3c9b0d5935ac0c406f7b9f3">flags</a>; <span class="comment">// 1 = fast key action, 2 = slow key action, 4 = slow action running, 8 = key test running</span>
<a name="l00346"></a><a class="code" href="class_u_i_display.html#ae739ef8fb1ba860a6b2c9e312cc65e86">00346</a>     uint8_t <a class="code" href="class_u_i_display.html#ae739ef8fb1ba860a6b2c9e312cc65e86">col</a>; <span class="comment">// current col for buffer prefill</span>
<a name="l00347"></a><a class="code" href="class_u_i_display.html#ab1839d1076b09f4dfc68eb40c7e44037">00347</a>     uint8_t <a class="code" href="class_u_i_display.html#ab1839d1076b09f4dfc68eb40c7e44037">menuLevel</a>; <span class="comment">// current menu level, 0 = info, 1 = group, 2 = groupdata select, 3 = value change</span>
<a name="l00348"></a><a class="code" href="class_u_i_display.html#ad7bd93b13934b2f3bab02d28b6db53c4">00348</a>     uint8_t <a class="code" href="class_u_i_display.html#ad7bd93b13934b2f3bab02d28b6db53c4">menuPos</a>[5]; <span class="comment">// Positions in menu</span>
<a name="l00349"></a><a class="code" href="class_u_i_display.html#a27dbbb06869a30432e1ba9555e26de47">00349</a>     <span class="keywordtype">void</span> *<a class="code" href="class_u_i_display.html#a27dbbb06869a30432e1ba9555e26de47">menu</a>[5]; <span class="comment">// Menus active</span>
<a name="l00350"></a><a class="code" href="class_u_i_display.html#a679991a4cf3b0b6634d341eb7e5ee3d7">00350</a>     uint8_t <a class="code" href="class_u_i_display.html#a679991a4cf3b0b6634d341eb7e5ee3d7">menuTop</a>[5]; <span class="comment">// Top row in menu</span>
<a name="l00351"></a><a class="code" href="class_u_i_display.html#aae0b870465c7dc8d516f8cba4d21bdfc">00351</a>     int8_t <a class="code" href="class_u_i_display.html#aae0b870465c7dc8d516f8cba4d21bdfc">shift</a>; <span class="comment">// Display shift for scrolling text</span>
<a name="l00352"></a><a class="code" href="class_u_i_display.html#a80c18d08a3f26b4f28183116268c46db">00352</a>     <span class="keywordtype">int</span> <a class="code" href="class_u_i_display.html#a80c18d08a3f26b4f28183116268c46db">pageDelay</a>; <span class="comment">// Counter. If 0 page is refreshed if menuLevel is 0.</span>
<a name="l00353"></a><a class="code" href="class_u_i_display.html#ac827ba8261f8eb941c3f02e2268c10be">00353</a>     <span class="keywordtype">void</span> *<a class="code" href="class_u_i_display.html#ac827ba8261f8eb941c3f02e2268c10be">errorMsg</a>;
<a name="l00354"></a><a class="code" href="class_u_i_display.html#a02c10b3541ff33ab341ec6e3adfebc36">00354</a>     uint16_t <a class="code" href="class_u_i_display.html#a02c10b3541ff33ab341ec6e3adfebc36">activeAction</a>; <span class="comment">// action for ok/next/previous</span>
<a name="l00355"></a><a class="code" href="class_u_i_display.html#a760bf7ba79f4678859e81e9f788ea75f">00355</a>     uint16_t <a class="code" href="class_u_i_display.html#a760bf7ba79f4678859e81e9f788ea75f">lastAction</a>;
<a name="l00356"></a><a class="code" href="class_u_i_display.html#a18955e7248c31c89a28f9e23a90c85ce">00356</a>     <a class="code" href="_h_a_l_8h.html#ab14fc3b0e7b9535ec25836108ce96a45">millis_t</a> <a class="code" href="class_u_i_display.html#a18955e7248c31c89a28f9e23a90c85ce">lastSwitch</a>; <span class="comment">// Last time display switched pages</span>
<a name="l00357"></a><a class="code" href="class_u_i_display.html#a311236841a49965f505015f9dac3c46c">00357</a>     <a class="code" href="_h_a_l_8h.html#ab14fc3b0e7b9535ec25836108ce96a45">millis_t</a> <a class="code" href="class_u_i_display.html#a311236841a49965f505015f9dac3c46c">lastRefresh</a>;
<a name="l00358"></a><a class="code" href="class_u_i_display.html#ae094ff63871418ffcd6da11715959d6e">00358</a>     uint16_t <a class="code" href="class_u_i_display.html#ae094ff63871418ffcd6da11715959d6e">lastButtonAction</a>;
<a name="l00359"></a><a class="code" href="class_u_i_display.html#ae37a6e2548b7e1bad7321b35f83df2c5">00359</a>     <a class="code" href="_h_a_l_8h.html#ab14fc3b0e7b9535ec25836108ce96a45">millis_t</a> <a class="code" href="class_u_i_display.html#ae37a6e2548b7e1bad7321b35f83df2c5">lastButtonStart</a>;
<a name="l00360"></a><a class="code" href="class_u_i_display.html#a964065521f51402999edbeda265b1397">00360</a>     <a class="code" href="_h_a_l_8h.html#ab14fc3b0e7b9535ec25836108ce96a45">millis_t</a> <a class="code" href="class_u_i_display.html#a964065521f51402999edbeda265b1397">nextRepeat</a>; <span class="comment">// Time of next autorepeat</span>
<a name="l00361"></a><a class="code" href="class_u_i_display.html#aeef8d3dff5202af0df545ea4f591b07a">00361</a>     <a class="code" href="_h_a_l_8h.html#ab14fc3b0e7b9535ec25836108ce96a45">millis_t</a> <a class="code" href="class_u_i_display.html#aeef8d3dff5202af0df545ea4f591b07a">lastNextPrev</a>; <span class="comment">// for increasing speed settings</span>
<a name="l00362"></a><a class="code" href="class_u_i_display.html#a4ec8bf0adcc27e584909aa9fe432a4d3">00362</a>     <span class="keywordtype">float</span> <a class="code" href="class_u_i_display.html#a4ec8bf0adcc27e584909aa9fe432a4d3">lastNextAccumul</a>; <span class="comment">// Accumulated value</span>
<a name="l00363"></a><a class="code" href="class_u_i_display.html#a7eafcff02948b689ebbeb50fbc62c11e">00363</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_u_i_display.html#a7eafcff02948b689ebbeb50fbc62c11e">outputMask</a>; <span class="comment">// Output mask for backlight, leds etc.</span>
<a name="l00364"></a><a class="code" href="class_u_i_display.html#ade69a49c05fa157ffb6bd558c22d5904">00364</a>     <span class="keywordtype">int</span> <a class="code" href="class_u_i_display.html#ade69a49c05fa157ffb6bd558c22d5904">repeatDuration</a>; <span class="comment">// Time beween to actions if autorepeat is enabled</span>
<a name="l00365"></a><a class="code" href="class_u_i_display.html#a3654964d0ad725a8d9e6161f61f2cfbc">00365</a>     int8_t <a class="code" href="class_u_i_display.html#a3654964d0ad725a8d9e6161f61f2cfbc">oldMenuLevel</a>;
<a name="l00366"></a><a class="code" href="class_u_i_display.html#a6f309ecd3a7c8e89d9cd7fb9a3d1fd0e">00366</a>     uint8_t <a class="code" href="class_u_i_display.html#a6f309ecd3a7c8e89d9cd7fb9a3d1fd0e">encoderStartScreen</a>;
<a name="l00367"></a>00367     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a7795f0351f3a70fd77f3c8a7b11d75f5">addInt</a>(<span class="keywordtype">int</span> value,uint8_t digits,<span class="keywordtype">char</span> fillChar=<span class="charliteral">&#39; &#39;</span>); <span class="comment">// Print int into printCols</span>
<a name="l00368"></a>00368     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a28880d7d66ab7900830b3d881e51da64">addLong</a>(<span class="keywordtype">long</span> value,<span class="keywordtype">char</span> digits);
<a name="l00369"></a>00369     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a5824b30b71fc8adf40325189651b57c3">addFloat</a>(<span class="keywordtype">float</span> number, <span class="keywordtype">char</span> fixdigits,uint8_t digits);
<a name="l00370"></a>00370     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#ac533fa9aaf97e5a717add5fd6f691d24">addStringP</a>(PGM_P text);
<a name="l00371"></a>00371     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#ada53b10fb4b9956f61d223ba30ddc717">okAction</a>();
<a name="l00372"></a>00372     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a7c6ec2c0fb44017d2d44d1bbde236431">nextPreviousAction</a>(int8_t next);
<a name="l00373"></a><a class="code" href="class_u_i_display.html#a46c029dc90d5c015e3ed4d3c3ba8b555">00373</a>     <span class="keywordtype">char</span> <a class="code" href="class_u_i_display.html#a46c029dc90d5c015e3ed4d3c3ba8b555">statusMsg</a>[17];
<a name="l00374"></a><a class="code" href="class_u_i_display.html#a6a6606d6b6f3b8edf8a6d8a839470c95">00374</a>     int8_t <a class="code" href="class_u_i_display.html#a6a6606d6b6f3b8edf8a6d8a839470c95">encoderPos</a>;
<a name="l00375"></a><a class="code" href="class_u_i_display.html#acc81538f4365875045d85692b1b19617">00375</a>     int8_t <a class="code" href="class_u_i_display.html#acc81538f4365875045d85692b1b19617">encoderLast</a>;
<a name="l00376"></a><a class="code" href="class_u_i_display.html#a9fcdded83c4b6845b764a500ac2edb12">00376</a>     PGM_P <a class="code" href="class_u_i_display.html#a9fcdded83c4b6845b764a500ac2edb12">statusText</a>;
<a name="l00377"></a>00377     <a class="code" href="class_u_i_display.html#a76426ad0cb68eef672b0be41ebe4abe2">UIDisplay</a>();
<a name="l00378"></a>00378     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a091ac8dc5b30673b640ade1ea1c7c9e6">createChar</a>(uint8_t location,<span class="keyword">const</span> uint8_t charmap[]);
<a name="l00379"></a>00379     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a25a40b6614565f755233080a384c35f1">initialize</a>(); <span class="comment">// Initialize display and keys</span>
<a name="l00380"></a>00380     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a6ee47e3046e6ea151b5547169c378623">waitForKey</a>();
<a name="l00381"></a>00381     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a6944c685479eaf13475622c7a0236681">printRow</a>(uint8_t r,<span class="keywordtype">char</span> *txt,<span class="keywordtype">char</span> *txt2,uint8_t changeAtCol); <span class="comment">// Print row on display</span>
<a name="l00382"></a>00382     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a23f55f4eec0f91ca82145c896d648241">printRowP</a>(uint8_t r,PGM_P txt);
<a name="l00383"></a>00383     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#abc31ae48522e42e9c30b369badeb39c7">parse</a>(<span class="keywordtype">char</span> *txt,<span class="keywordtype">bool</span> ram); 
<a name="l00384"></a>00384     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a6894bddf27143554707b3845a4824ad3" title="Parse output and write to printCols;.">refreshPage</a>();
<a name="l00385"></a>00385     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a2a158e6c1a0f1b84bde0bcfc0ee18404">executeAction</a>(<span class="keywordtype">int</span> action);
<a name="l00386"></a>00386     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a2bd1f869cfc82a61b060f47f09645778">finishAction</a>(<span class="keywordtype">int</span> action);
<a name="l00387"></a>00387     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#ac3f6a3fc9e7539e0ee15ce59614154c7">slowAction</a>();
<a name="l00388"></a>00388     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#ae4bafb367f3b1322c50544ebdaf6299b">fastAction</a>();
<a name="l00389"></a>00389     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#aacc0bb4e1922016ee22e64cbe1af935b">mediumAction</a>();
<a name="l00390"></a>00390     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#ae960fb6cadf828e999c114bc2e193e61">pushMenu</a>(<span class="keywordtype">void</span> *men,<span class="keywordtype">bool</span> refresh);
<a name="l00391"></a>00391     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#af2bb765cf7b52562028433f403e9c344">setStatusP</a>(PGM_P txt);
<a name="l00392"></a>00392     <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a65b38229c5c0582511825cb811525f76">setStatus</a>(<span class="keywordtype">char</span> *txt);
<a name="l00393"></a><a class="code" href="class_u_i_display.html#a510fc792157b075bfa8a1266c964b939">00393</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#a510fc792157b075bfa8a1266c964b939">setOutputMaskBits</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bits) {<a class="code" href="class_u_i_display.html#a7eafcff02948b689ebbeb50fbc62c11e">outputMask</a>|=bits;}
<a name="l00394"></a><a class="code" href="class_u_i_display.html#acbd5931c8af70912d2336b87fd57dbdc">00394</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_u_i_display.html#acbd5931c8af70912d2336b87fd57dbdc">unsetOutputMaskBits</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bits) {<a class="code" href="class_u_i_display.html#a7eafcff02948b689ebbeb50fbc62c11e">outputMask</a>&amp;=~bits;}
<a name="l00395"></a>00395 <span class="preprocessor">#if SDSUPPORT</span>
<a name="l00396"></a>00396 <span class="preprocessor"></span>    <span class="keywordtype">void</span> updateSDFileCount();
<a name="l00397"></a>00397     <span class="comment">//void sdrefresh(uint8_t &amp;r,char cache[UI_ROWS][MAX_COLS+1]);</span>
<a name="l00398"></a>00398     <span class="keywordtype">void</span> goDir(<span class="keywordtype">char</span> *name);
<a name="l00399"></a>00399     <span class="keywordtype">bool</span> isDirname(<span class="keywordtype">char</span> *name);
<a name="l00400"></a>00400     <span class="keywordtype">char</span> cwd[<a class="code" href="_repetier_8h.html#a4f72bc2f610f4156f446d7cc00fab46c">SD_MAX_FOLDER_DEPTH</a>*<a class="code" href="_repetier_8h.html#a44a03c09095315ecc8926e18c325472c">LONG_FILENAME_LENGTH</a>+2];
<a name="l00401"></a>00401     uint8_t folderLevel;
<a name="l00402"></a>00402 <span class="preprocessor">#endif</span>
<a name="l00403"></a>00403 <span class="preprocessor"></span>};
<a name="l00404"></a>00404 <span class="keyword">extern</span> <a class="code" href="class_u_i_display.html">UIDisplay</a> <a class="code" href="ui_8cpp.html#a03d0d829c6e013e9d5817ed2fdd45a9d">uid</a>;
<a name="l00405"></a>00405 
<a name="l00406"></a>00406 
<a name="l00407"></a>00407 <span class="preprocessor">#if FEATURE_CONTROLLER==1</span>
<a name="l00408"></a>00408 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="uiconfig_8h.html">uiconfig.h</a>&quot;</span>
<a name="l00409"></a>00409 <span class="preprocessor">#endif</span>
<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#if FEATURE_CONTROLLER==0 // No controller at all</span>
<a name="l00411"></a><a class="code" href="ui_8h.html#a267f14484086fc10fbc14aecf9bf26a9">00411</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 0</span>
<a name="l00412"></a><a class="code" href="ui_8h.html#a1f1cfb8da393500709a423b74c8c60c9">00412</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 0</span>
<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00414"></a>00414 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {}
<a name="l00415"></a>00415 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00416"></a>00416 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {}
<a name="l00417"></a>00417 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00418"></a>00418 <span class="preprocessor">#endif</span>
<a name="l00419"></a>00419 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00420"></a>00420 <span class="preprocessor"></span><span class="preprocessor">#if FEATURE_CONTROLLER==2 || FEATURE_CONTROLLER==10 || FEATURE_CONTROLLER==11 // reprapdiscount smartcontroller (2) gadgets3d (10)</span>
<a name="l00421"></a>00421 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 0</span>
<a name="l00423"></a>00423 <span class="preprocessor"></span><span class="preprocessor">#if FEATURE_CONTROLLER==11</span>
<a name="l00424"></a>00424 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 5</span>
<a name="l00425"></a>00425 <span class="preprocessor"></span><span class="preprocessor">#define U8GLIB_ST7920</span>
<a name="l00426"></a>00426 <span class="preprocessor"></span><span class="preprocessor">#define UI_LCD_WIDTH 128</span>
<a name="l00427"></a>00427 <span class="preprocessor"></span><span class="preprocessor">#define UI_LCD_HEIGHT 64</span>
<a name="l00428"></a>00428 <span class="preprocessor"></span>
<a name="l00429"></a>00429 <span class="comment">//select font size</span>
<a name="l00430"></a>00430 <span class="preprocessor">#define UI_FONT_6X10 //default font</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_FONT_6X10</span>
<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_WIDTH 6</span>
<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_HEIGHT 10</span>
<a name="l00434"></a>00434 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_SMALL_HEIGHT 7</span>
<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_DEFAULT repetier_6x10</span>
<a name="l00436"></a>00436 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_SMALL repetier_5x7</span>
<a name="l00437"></a>00437 <span class="preprocessor"></span><span class="preprocessor">#define UI_FONT_SMALL_WIDTH 5 //smaller font for status display</span>
<a name="l00438"></a>00438 <span class="preprocessor"></span><span class="preprocessor">#define UI_ANIMATION false  // Animations are too slow</span>
<a name="l00439"></a>00439 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00440"></a>00440 <span class="preprocessor"></span>
<a name="l00441"></a>00441 <span class="comment">//calculate rows and cols available with current font</span>
<a name="l00442"></a>00442 <span class="preprocessor">#define UI_COLS (UI_LCD_WIDTH/UI_FONT_WIDTH)</span>
<a name="l00443"></a>00443 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS (UI_LCD_HEIGHT/UI_FONT_HEIGHT)</span>
<a name="l00444"></a>00444 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 3</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00446"></a>00446 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 1</span>
<a name="l00447"></a>00447 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 1</span>
<a name="l00448"></a>00448 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 20</span>
<a name="l00449"></a>00449 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 4</span>
<a name="l00450"></a>00450 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00451"></a>00451 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_TYPE 1</span>
<a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor">#if FEATURE_CONTROLLER==10 // Gadgets3d shield</span>
<a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             33</span>
<a name="l00454"></a>00454 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      16</span>
<a name="l00455"></a>00455 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00456"></a>00456 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  17</span>
<a name="l00457"></a>00457 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      23</span>
<a name="l00458"></a>00458 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      25</span>
<a name="l00459"></a>00459 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      27</span>
<a name="l00460"></a>00460 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      29</span>
<a name="l00461"></a>00461 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      23</span>
<a name="l00462"></a>00462 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      25</span>
<a name="l00463"></a>00463 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      27</span>
<a name="l00464"></a>00464 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      29</span>
<a name="l00465"></a>00465 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           35</span>
<a name="l00466"></a>00466 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           37</span>
<a name="l00467"></a>00467 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       31</span>
<a name="l00468"></a>00468 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           41</span>
<a name="l00469"></a>00469 <span class="preprocessor"></span><span class="preprocessor">#else  // Smartcontroller</span>
<a name="l00470"></a>00470 <span class="preprocessor"></span><span class="preprocessor">#if MOTHERBOARD==80 // Rumba has different pins as RAMPS!</span>
<a name="l00471"></a>00471 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             44</span>
<a name="l00472"></a>00472 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      19</span>
<a name="l00473"></a>00473 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00474"></a>00474 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  42</span>
<a name="l00475"></a>00475 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      18</span>
<a name="l00476"></a>00476 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      38</span>
<a name="l00477"></a>00477 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      41</span>
<a name="l00478"></a>00478 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      40</span>
<a name="l00479"></a>00479 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      18</span>
<a name="l00480"></a>00480 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      38</span>
<a name="l00481"></a>00481 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      41</span>
<a name="l00482"></a>00482 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      40</span>
<a name="l00483"></a>00483 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           12</span>
<a name="l00484"></a>00484 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           11</span>
<a name="l00485"></a>00485 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       43</span>
<a name="l00486"></a>00486 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           46</span>
<a name="l00487"></a>00487 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00488"></a>00488 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             37</span>
<a name="l00489"></a>00489 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      16</span>
<a name="l00490"></a>00490 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00491"></a>00491 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  17</span>
<a name="l00492"></a>00492 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      23</span>
<a name="l00493"></a>00493 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      25</span>
<a name="l00494"></a>00494 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      27</span>
<a name="l00495"></a>00495 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      29</span>
<a name="l00496"></a>00496 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      23</span>
<a name="l00497"></a>00497 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      25</span>
<a name="l00498"></a>00498 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      27</span>
<a name="l00499"></a>00499 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      29</span>
<a name="l00500"></a>00500 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           33</span>
<a name="l00501"></a>00501 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           31</span>
<a name="l00502"></a>00502 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       35</span>
<a name="l00503"></a>00503 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           41</span>
<a name="l00504"></a>00504 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00505"></a>00505 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00506"></a>00506 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00507"></a>00507 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION false</span>
<a name="l00508"></a>00508 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00509"></a>00509 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00510"></a>00510   <a class="code" href="ui_8h.html#a4b401e8097f3cf841db33914755bad3a">UI_KEYS_INIT_CLICKENCODER_LOW</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span>
<a name="l00511"></a>00511   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_ENCODER_CLICK); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00512"></a>00512   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_RESET_PIN); <span class="comment">// Kill pin</span>
<a name="l00513"></a>00513 }
<a name="l00514"></a>00514 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00515"></a>00515  <a class="code" href="ui_8h.html#a57f3db99b2afc7b9d7227972813038a7">UI_KEYS_CLICKENCODER_LOW_REV</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span>
<a name="l00516"></a>00516  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_ENCODER_CLICK,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00517"></a>00517  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_RESET_PIN,<a class="code" href="ui_8h.html#a0cf0b3cff32d4b278642d3cd3d507871">UI_ACTION_RESET</a>);
<a name="l00518"></a>00518 }
<a name="l00519"></a>00519 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {}
<a name="l00520"></a>00520 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00521"></a>00521 <span class="preprocessor">#endif</span>
<a name="l00522"></a>00522 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 2 and 10</span>
<a name="l00523"></a>00523 <span class="preprocessor"></span>
<a name="l00524"></a>00524 <span class="preprocessor">#if FEATURE_CONTROLLER==3 // Adafruit RGB controller</span>
<a name="l00525"></a>00525 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00526"></a>00526 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 1</span>
<a name="l00527"></a>00527 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 3</span>
<a name="l00528"></a>00528 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 1</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 16</span>
<a name="l00530"></a>00530 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 2</span>
<a name="l00531"></a>00531 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_CHIPTYPE 1</span>
<a name="l00532"></a>00532 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_ADDRESS 0x40</span>
<a name="l00533"></a>00533 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_PINS 65504</span>
<a name="l00534"></a>00534 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0</span>
<a name="l00535"></a>00535 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_PULLUP 31</span>
<a name="l00536"></a>00536 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_CLOCKSPEED 400000L</span>
<a name="l00537"></a>00537 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN _BV(15)</span>
<a name="l00538"></a>00538 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN _BV(14)</span>
<a name="l00539"></a>00539 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN _BV(13)</span>
<a name="l00540"></a>00540 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN _BV(12)</span>
<a name="l00541"></a>00541 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN _BV(11)</span>
<a name="l00542"></a>00542 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN _BV(10)</span>
<a name="l00543"></a>00543 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN _BV(9)</span>
<a name="l00544"></a>00544 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN _BV(12)</span>
<a name="l00545"></a>00545 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN _BV(11)</span>
<a name="l00546"></a>00546 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN _BV(10)</span>
<a name="l00547"></a>00547 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN _BV(9)</span>
<a name="l00548"></a>00548 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION true</span>
<a name="l00549"></a>00549 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_I2C_KEYS</span>
<a name="l00550"></a>00550 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_I2C_ENCODER 0</span>
<a name="l00551"></a>00551 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_KEY_ADDRESS 0x40</span>
<a name="l00552"></a>00552 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00553"></a>00553 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {}
<a name="l00554"></a>00554 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00555"></a>00555 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {
<a name="l00556"></a>00556   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a>);
<a name="l00557"></a>00557   <a class="code" href="class_h_a_l.html#a2b905c212d29a99cd82e7f16d8572ed0">HAL::i2cWrite</a>(0x12); <span class="comment">// GIOA</span>
<a name="l00558"></a>00558   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00559"></a>00559   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);
<a name="l00560"></a>00560   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keymask = <a class="code" href="class_h_a_l.html#ab7b23a8495801a3ec28f2b2e3e483df1">HAL::i2cReadAck</a>();
<a name="l00561"></a>00561   keymask = keymask + (<a class="code" href="class_h_a_l.html#aee78ce54d9b9923624e960f77669852e">HAL::i2cReadNak</a>()&lt;&lt;8);
<a name="l00562"></a>00562   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00563"></a>00563 }
<a name="l00564"></a>00564 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00565"></a>00565   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a>);
<a name="l00566"></a>00566   <a class="code" href="class_h_a_l.html#a2b905c212d29a99cd82e7f16d8572ed0">HAL::i2cWrite</a>(0x12); <span class="comment">// GPIOA</span>
<a name="l00567"></a>00567   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00568"></a>00568   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);
<a name="l00569"></a>00569   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keymask = <a class="code" href="class_h_a_l.html#ab7b23a8495801a3ec28f2b2e3e483df1">HAL::i2cReadAck</a>();
<a name="l00570"></a>00570   keymask = keymask + (<a class="code" href="class_h_a_l.html#aee78ce54d9b9923624e960f77669852e">HAL::i2cReadNak</a>()&lt;&lt;8);
<a name="l00571"></a>00571   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00572"></a>00572   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(4,<a class="code" href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">UI_ACTION_PREVIOUS</a>); <span class="comment">// Up button</span>
<a name="l00573"></a>00573   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(8,<a class="code" href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">UI_ACTION_NEXT</a>); <span class="comment">// down button</span>
<a name="l00574"></a>00574   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(16,<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>); <span class="comment">// left button</span>
<a name="l00575"></a>00575   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(2,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// right button</span>
<a name="l00576"></a>00576   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(1,<a class="code" href="ui_8h.html#ab3d8752161348913470ede0ca42249f4">UI_ACTION_MENU_QUICKSETTINGS</a>);  <span class="comment">//Select button</span>
<a name="l00577"></a>00577 }
<a name="l00578"></a>00578 <span class="preprocessor">#endif</span>
<a name="l00579"></a>00579 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 3</span>
<a name="l00580"></a>00580 <span class="preprocessor"></span>
<a name="l00581"></a>00581 <span class="preprocessor">#if FEATURE_CONTROLLER==4 // Foltyn 3D Master</span>
<a name="l00582"></a>00582 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00583"></a>00583 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 1</span>
<a name="l00584"></a>00584 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 1</span>
<a name="l00585"></a>00585 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 2</span>
<a name="l00586"></a>00586 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 20</span>
<a name="l00587"></a>00587 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 4</span>
<a name="l00588"></a>00588 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN               63              // PINK.1, 88, D_RS</span>
<a name="l00589"></a>00589 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN               -1</span>
<a name="l00590"></a>00590 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN           65              // PINK.3, 86, D_E</span>
<a name="l00591"></a>00591 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN               59              // PINF.5, 92, D_D4</span>
<a name="l00592"></a>00592 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN               64              // PINK.2, 87, D_D5</span>
<a name="l00593"></a>00593 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN               44              // PINL.5, 40, D_D6</span>
<a name="l00594"></a>00594 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN               66              // PINK.4, 85, D_D7</span>
<a name="l00595"></a>00595 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN               59              // PINF.5, 92, D_D4</span>
<a name="l00596"></a>00596 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN               64              // PINK.2, 87, D_D5</span>
<a name="l00597"></a>00597 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN               44              // PINL.5, 40, D_D6</span>
<a name="l00598"></a>00598 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN               66              // PINK.4, 85, D_D7</span>
<a name="l00599"></a>00599 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR            320</span>
<a name="l00600"></a>00600 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION false</span>
<a name="l00601"></a>00601 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00602"></a>00602 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00603"></a>00603   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(4); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00604"></a>00604   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(5);
<a name="l00605"></a>00605   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(6);
<a name="l00606"></a>00606   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(11);
<a name="l00607"></a>00607   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(42);
<a name="l00608"></a>00608 }
<a name="l00609"></a>00609 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00610"></a>00610  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(4,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00611"></a>00611  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(5,<a class="code" href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">UI_ACTION_NEXT</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00612"></a>00612  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(6,<a class="code" href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">UI_ACTION_PREVIOUS</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00613"></a>00613  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(11,<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00614"></a>00614  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(42,<a class="code" href="ui_8h.html#ae915626599ace17139e49669b86acb10">UI_ACTION_SD_PRINT</a> ); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00615"></a>00615 }
<a name="l00616"></a>00616 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {}
<a name="l00617"></a>00617 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00618"></a>00618 <span class="preprocessor">#endif</span>
<a name="l00619"></a>00619 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 4</span>
<a name="l00620"></a>00620 <span class="preprocessor"></span>
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 <span class="preprocessor">#if FEATURE_CONTROLLER==5 // Viki Lcd</span>
<a name="l00623"></a>00623 <span class="preprocessor"></span>
<a name="l00624"></a>00624 <span class="comment">// You need to change these 3 button according to the positions</span>
<a name="l00625"></a>00625 <span class="comment">// where you put them into your board!</span>
<a name="l00626"></a>00626 <span class="preprocessor">#define UI_ENCODER_A      7 // pins the click encoder are connected to</span>
<a name="l00627"></a>00627 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B      22</span>
<a name="l00628"></a>00628 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN      32 // single button for reset</span>
<a name="l00629"></a>00629 <span class="preprocessor"></span><span class="preprocessor">#define SDCARDDETECT      49 // Set to -1 if you have not connected that pin</span>
<a name="l00630"></a>00630 <span class="preprocessor"></span><span class="preprocessor">#define SDSS              53 // Chip select pin</span>
<a name="l00631"></a>00631 <span class="preprocessor"></span>
<a name="l00632"></a>00632 <span class="preprocessor">#define SDSUPPORT true</span>
<a name="l00633"></a>00633 <span class="preprocessor"></span><span class="preprocessor">#define SDCARDDETECTINVERTED false</span>
<a name="l00634"></a>00634 <span class="preprocessor"></span>
<a name="l00635"></a>00635 <span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00636"></a>00636 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 1</span>
<a name="l00637"></a>00637 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 3</span>
<a name="l00638"></a>00638 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 1</span>
<a name="l00639"></a>00639 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 20</span>
<a name="l00640"></a>00640 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 4</span>
<a name="l00641"></a>00641 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_CHIPTYPE 1</span>
<a name="l00642"></a>00642 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_ADDRESS 0x40</span>
<a name="l00643"></a>00643 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_PINS 0xFFE0</span>
<a name="l00644"></a>00644 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_OUTPUT_START_MASK 0x01C0 // bits that are high always, for now the 3 viki leds</span>
<a name="l00645"></a>00645 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_I2C_PULLUP 0x001F</span>
<a name="l00646"></a>00646 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_CLOCKSPEED 100000L // Note with very long cables make this much smaller, for 2ft cables I found 80000 worked ok</span>
<a name="l00647"></a>00647 <span class="preprocessor"></span>
<a name="l00648"></a>00648 <span class="preprocessor">#define UI_DISPLAY_RS_PIN _BV(15)</span>
<a name="l00649"></a>00649 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN _BV(14)</span>
<a name="l00650"></a>00650 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN _BV(13)</span>
<a name="l00651"></a>00651 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN _BV(12)</span>
<a name="l00652"></a>00652 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN _BV(11)</span>
<a name="l00653"></a>00653 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN _BV(10)</span>
<a name="l00654"></a>00654 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN _BV(9)</span>
<a name="l00655"></a>00655 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN _BV(12)</span>
<a name="l00656"></a>00656 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN _BV(11)</span>
<a name="l00657"></a>00657 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN _BV(10)</span>
<a name="l00658"></a>00658 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN _BV(9)</span>
<a name="l00659"></a>00659 <span class="preprocessor"></span>
<a name="l00660"></a>00660 
<a name="l00661"></a>00661 <span class="preprocessor">#if true || !defined(BEEPER_PIN) || BEEPER_PIN&lt;0</span>
<a name="l00662"></a>00662 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN        _BV(5)</span>
<a name="l00663"></a>00663 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_TYPE       2</span>
<a name="l00664"></a>00664 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_ADDRESS    UI_DISPLAY_I2C_ADDRESS // I2C address of the chip with the beeper pin</span>
<a name="l00665"></a>00665 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00666"></a>00666 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_HEATBED_LED    _BV(8)</span>
<a name="l00667"></a>00667 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_HOTEND_LED     _BV(7)</span>
<a name="l00668"></a>00668 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_FAN_LED        _BV(6)</span>
<a name="l00669"></a>00669 <span class="preprocessor"></span>
<a name="l00670"></a>00670 <span class="preprocessor">#define UI_INVERT_MENU_DIRECTION false</span>
<a name="l00671"></a>00671 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_I2C_KEYS</span>
<a name="l00672"></a>00672 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_I2C_ENCODER 0</span>
<a name="l00673"></a>00673 <span class="preprocessor"></span><span class="preprocessor">#define UI_I2C_KEY_ADDRESS 0x40</span>
<a name="l00674"></a>00674 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00675"></a>00675 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00676"></a>00676   <a class="code" href="ui_8h.html#a4b401e8097f3cf841db33914755bad3a">UI_KEYS_INIT_CLICKENCODER_LOW</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on real pins. Phase is connected with gnd for signals.</span>
<a name="l00677"></a>00677   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_RESET_PIN); <span class="comment">// Kill pin</span>
<a name="l00678"></a>00678 }
<a name="l00679"></a>00679 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00680"></a>00680   <a class="code" href="ui_8h.html#a57f3db99b2afc7b9d7227972813038a7">UI_KEYS_CLICKENCODER_LOW_REV</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on real pins</span>
<a name="l00681"></a>00681   <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_RESET_PIN,<a class="code" href="ui_8h.html#a0cf0b3cff32d4b278642d3cd3d507871">UI_ACTION_RESET</a>);
<a name="l00682"></a>00682 }
<a name="l00683"></a>00683 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() { }<span class="comment">// not used in Viki</span>
<a name="l00684"></a>00684 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00685"></a>00685   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#a9536bf85bced4f4e549a82fb18eb6140">I2C_WRITE</a>);
<a name="l00686"></a>00686   <a class="code" href="class_h_a_l.html#a2b905c212d29a99cd82e7f16d8572ed0">HAL::i2cWrite</a>(0x12); <span class="comment">// GPIOA</span>
<a name="l00687"></a>00687   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00688"></a>00688   <a class="code" href="class_h_a_l.html#a80acad3cb511fbc8b546c64eccb40c20">HAL::i2cStartWait</a>(<a class="code" href="uiconfig_8h.html#a66017bbab05e934b49579f36888e644e">UI_DISPLAY_I2C_ADDRESS</a>+<a class="code" href="_h_a_l_8h.html#ab5c0fbe837494c5f9130a5914854250d">I2C_READ</a>);
<a name="l00689"></a>00689   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keymask = <a class="code" href="class_h_a_l.html#ab7b23a8495801a3ec28f2b2e3e483df1">HAL::i2cReadAck</a>();
<a name="l00690"></a>00690   keymask = keymask + (<a class="code" href="class_h_a_l.html#aee78ce54d9b9923624e960f77669852e">HAL::i2cReadNak</a>()&lt;&lt;8);
<a name="l00691"></a>00691   <a class="code" href="class_h_a_l.html#a46f365de216a017131a0fdc53067b741">HAL::i2cStop</a>();
<a name="l00692"></a>00692   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(4,<a class="code" href="ui_8h.html#ad47a9dfc7ec12e79953fd27b4bd6919e">UI_ACTION_MENU_SDCARD</a>);        <span class="comment">// Up button</span>
<a name="l00693"></a>00693   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(8,<a class="code" href="ui_8h.html#ab3d8752161348913470ede0ca42249f4">UI_ACTION_MENU_QUICKSETTINGS</a>); <span class="comment">// down button</span>
<a name="l00694"></a>00694   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(16,<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>);              <span class="comment">// left button</span>
<a name="l00695"></a>00695   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(2,<a class="code" href="ui_8h.html#a8b7577d468ba88db2cdaf41e1a85436c">UI_ACTION_MENU_POSITIONS</a>);     <span class="comment">// right button</span>
<a name="l00696"></a>00696   <a class="code" href="ui_8h.html#a855e669efc242816863c0b4e7b0e42d6">UI_KEYS_I2C_BUTTON_LOW</a>(1,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>);                 <span class="comment">//Select button</span>
<a name="l00697"></a>00697 
<a name="l00698"></a>00698 }
<a name="l00699"></a>00699 <span class="preprocessor">#endif</span>
<a name="l00700"></a>00700 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 5</span>
<a name="l00701"></a>00701 <span class="preprocessor"></span>
<a name="l00702"></a>00702 <span class="preprocessor">#if FEATURE_CONTROLLER==6 // ReprapWorld Keypad / LCD</span>
<a name="l00703"></a>00703 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00704"></a>00704 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 0</span>
<a name="l00705"></a>00705 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 1</span>
<a name="l00706"></a>00706 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 0</span>
<a name="l00707"></a>00707 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 20</span>
<a name="l00708"></a>00708 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 2</span>
<a name="l00709"></a>00709 <span class="preprocessor"></span>
<a name="l00710"></a>00710 <span class="preprocessor">#if MOTHERBOARD==701 // Megatronics v2.0</span>
<a name="l00711"></a>00711 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN 14</span>
<a name="l00712"></a>00712 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN -1</span>
<a name="l00713"></a>00713 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN 15</span>
<a name="l00714"></a>00714 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN 30</span>
<a name="l00715"></a>00715 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN 31</span>
<a name="l00716"></a>00716 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN 32</span>
<a name="l00717"></a>00717 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN 33</span>
<a name="l00718"></a>00718 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A 61</span>
<a name="l00719"></a>00719 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B 59</span>
<a name="l00720"></a>00720 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK 43</span>
<a name="l00721"></a>00721 <span class="preprocessor"></span>
<a name="l00722"></a>00722 <span class="preprocessor">#define UI_SHIFT_OUT 17</span>
<a name="l00723"></a>00723 <span class="preprocessor"></span><span class="preprocessor">#define UI_SHIFT_LD 42</span>
<a name="l00724"></a>00724 <span class="preprocessor"></span><span class="preprocessor">#define UI_SHIFT_CLK 63</span>
<a name="l00725"></a>00725 <span class="preprocessor"></span>
<a name="l00726"></a>00726 <span class="preprocessor">#else // RAMPS 1.4</span>
<a name="l00727"></a>00727 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN 16</span>
<a name="l00728"></a>00728 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN -1</span>
<a name="l00729"></a>00729 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN 17</span>
<a name="l00730"></a>00730 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN 23</span>
<a name="l00731"></a>00731 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN 25</span>
<a name="l00732"></a>00732 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN 27</span>
<a name="l00733"></a>00733 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN 29</span>
<a name="l00734"></a>00734 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A 64</span>
<a name="l00735"></a>00735 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B 59</span>
<a name="l00736"></a>00736 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK 63</span>
<a name="l00737"></a>00737 <span class="preprocessor"></span>
<a name="l00738"></a>00738 <span class="preprocessor">#define UI_SHIFT_OUT 40</span>
<a name="l00739"></a>00739 <span class="preprocessor"></span><span class="preprocessor">#define UI_SHIFT_LD 42</span>
<a name="l00740"></a>00740 <span class="preprocessor"></span><span class="preprocessor">#define UI_SHIFT_CLK 44</span>
<a name="l00741"></a>00741 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00742"></a>00742 <span class="preprocessor"></span>
<a name="l00743"></a>00743 <span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00744"></a>00744 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION true</span>
<a name="l00745"></a>00745 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00746"></a>00746 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00747"></a>00747     <a class="code" href="ui_8h.html#a4b401e8097f3cf841db33914755bad3a">UI_KEYS_INIT_CLICKENCODER_LOW</a>(UI_ENCODER_A,UI_ENCODER_B);
<a name="l00748"></a>00748     <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_ENCODER_CLICK);
<a name="l00749"></a>00749 
<a name="l00750"></a>00750     <a class="code" href="fastio_8h.html#a4bdb8759f0e85e88956ac23262e0916b" title="set pin as output wrapper">SET_OUTPUT</a>(UI_SHIFT_CLK);
<a name="l00751"></a>00751     <a class="code" href="fastio_8h.html#a4bdb8759f0e85e88956ac23262e0916b" title="set pin as output wrapper">SET_OUTPUT</a>(UI_SHIFT_LD);
<a name="l00752"></a>00752     <a class="code" href="fastio_8h.html#afa76df25ccdb2d113a057c8c305399cc" title="set pin as input wrapper">SET_INPUT</a>(UI_SHIFT_OUT);
<a name="l00753"></a>00753 
<a name="l00754"></a>00754     <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_OUT,HIGH);
<a name="l00755"></a>00755     <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_LD,HIGH);
<a name="l00756"></a>00756 }
<a name="l00757"></a>00757 
<a name="l00758"></a>00758 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00759"></a>00759     <a class="code" href="ui_8h.html#a57f3db99b2afc7b9d7227972813038a7">UI_KEYS_CLICKENCODER_LOW_REV</a>(UI_ENCODER_A,UI_ENCODER_B);
<a name="l00760"></a>00760     <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_ENCODER_CLICK,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>);
<a name="l00761"></a>00761 }
<a name="l00762"></a>00762 
<a name="l00763"></a>00763 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {} <span class="comment">// not used</span>
<a name="l00764"></a>00764 
<a name="l00765"></a>00765 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00766"></a>00766 
<a name="l00767"></a>00767     <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_LD,LOW);
<a name="l00768"></a>00768     <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_LD,HIGH);
<a name="l00769"></a>00769 
<a name="l00770"></a>00770     <span class="keywordflow">for</span>(int8_t i=1;i&lt;=8;i++) {
<a name="l00771"></a>00771         <span class="keywordflow">if</span>(!<a class="code" href="fastio_8h.html#a9716cca366b99de7c0d101eeab24c967" title="Read a pin wrapper.">READ</a>(UI_SHIFT_OUT)) { <span class="comment">// pressed button = logical 0 (false)</span>
<a name="l00772"></a>00772             <span class="keywordflow">switch</span> (i) {
<a name="l00773"></a>00773                 <span class="keywordflow">case</span> 1: action = <a class="code" href="ui_8h.html#ab5f4d84b80e3d4dfca2e13d5932e846e">UI_ACTION_Z_DOWN</a>; <span class="keywordflow">break</span>; <span class="comment">// F3</span>
<a name="l00774"></a>00774                 <span class="keywordflow">case</span> 2: action = <a class="code" href="ui_8h.html#a2d3c8282f91225976a4ef7f124184d40">UI_ACTION_Z_UP</a>; <span class="keywordflow">break</span>; <span class="comment">// F2</span>
<a name="l00775"></a>00775                 <span class="keywordflow">case</span> 3: action = <a class="code" href="ui_8h.html#ae56bdf8e572fecb23c86150c243ac2d3">UI_ACTION_EMERGENCY_STOP</a>; <span class="keywordflow">break</span>; <span class="comment">// F1</span>
<a name="l00776"></a>00776                 <span class="keywordflow">case</span> 4: action = <a class="code" href="ui_8h.html#ae862683e3ceecb61906a59badd42a6c7">UI_ACTION_Y_UP</a>; <span class="keywordflow">break</span>; <span class="comment">// UP</span>
<a name="l00777"></a>00777                 <span class="keywordflow">case</span> 5: action = <a class="code" href="ui_8h.html#a622fc8ab61db41c7c6e757a8ff7eec5f">UI_ACTION_X_UP</a>; <span class="keywordflow">break</span>; <span class="comment">// RIGHT</span>
<a name="l00778"></a>00778                 <span class="keywordflow">case</span> 6: action = <a class="code" href="ui_8h.html#a5fd2d531eccf1d966c177a8e2e137ab7">UI_ACTION_HOME_ALL</a>; <span class="keywordflow">break</span>; <span class="comment">// MID</span>
<a name="l00779"></a>00779                 <span class="keywordflow">case</span> 7: action = <a class="code" href="ui_8h.html#a244ce005a688a49e3a4b2f1a9396f3f5">UI_ACTION_Y_DOWN</a>; <span class="keywordflow">break</span>; <span class="comment">// DOWN</span>
<a name="l00780"></a>00780                 <span class="keywordflow">case</span> 8: action = <a class="code" href="ui_8h.html#a8690b243ec5d0dde903923e524e6ee68">UI_ACTION_X_DOWN</a>; <span class="keywordflow">break</span>; <span class="comment">// LEFT</span>
<a name="l00781"></a>00781             }
<a name="l00782"></a>00782             i = 9; <span class="comment">// if button detected, exit &quot;for loop&quot;</span>
<a name="l00783"></a>00783         }
<a name="l00784"></a>00784         <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_CLK,HIGH);
<a name="l00785"></a>00785         <a class="code" href="fastio_8h.html#a3d38c0667426652d3fa2eb62f23e1591" title="Write to a pin wrapper.">WRITE</a>(UI_SHIFT_CLK,LOW);
<a name="l00786"></a>00786     }
<a name="l00787"></a>00787 }
<a name="l00788"></a>00788 <span class="preprocessor">#endif</span>
<a name="l00789"></a>00789 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 6</span>
<a name="l00790"></a>00790 <span class="preprocessor"></span><span class="preprocessor">#if FEATURE_CONTROLLER==7 // RADDS pin assignment for displays</span>
<a name="l00791"></a>00791 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00792"></a>00792 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 0</span>
<a name="l00793"></a>00793 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 1</span>
<a name="l00794"></a>00794 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 1</span>
<a name="l00795"></a>00795 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_TYPE 1</span>
<a name="l00796"></a>00796 <span class="preprocessor"></span><span class="preprocessor">#define UI_COLS 20</span>
<a name="l00797"></a>00797 <span class="preprocessor"></span><span class="preprocessor">#define UI_ROWS 4</span>
<a name="l00798"></a>00798 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             41</span>
<a name="l00799"></a>00799 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      42</span>
<a name="l00800"></a>00800 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00801"></a>00801 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  43</span>
<a name="l00802"></a>00802 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      44</span>
<a name="l00803"></a>00803 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      45</span>
<a name="l00804"></a>00804 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      46</span>
<a name="l00805"></a>00805 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      47</span>
<a name="l00806"></a>00806 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      44</span>
<a name="l00807"></a>00807 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      45</span>
<a name="l00808"></a>00808 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      46</span>
<a name="l00809"></a>00809 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      47</span>
<a name="l00810"></a>00810 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           52</span>
<a name="l00811"></a>00811 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           50</span>
<a name="l00812"></a>00812 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       48</span>
<a name="l00813"></a>00813 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           -1</span>
<a name="l00814"></a>00814 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00815"></a>00815 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION false</span>
<a name="l00816"></a>00816 <span class="preprocessor"></span><span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00817"></a>00817 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00818"></a>00818   <a class="code" href="ui_8h.html#a4b401e8097f3cf841db33914755bad3a">UI_KEYS_INIT_CLICKENCODER_LOW</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span>
<a name="l00819"></a>00819   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_ENCODER_CLICK); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00820"></a>00820 }
<a name="l00821"></a>00821 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00822"></a>00822  <a class="code" href="ui_8h.html#a57f3db99b2afc7b9d7227972813038a7">UI_KEYS_CLICKENCODER_LOW_REV</a>(UI_ENCODER_A,UI_ENCODER_B); <span class="comment">// click encoder on pins 47 and 45. Phase is connected with gnd for signals.</span>
<a name="l00823"></a>00823  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_ENCODER_CLICK,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00824"></a>00824 }
<a name="l00825"></a>00825 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {}
<a name="l00826"></a>00826 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00827"></a>00827 <span class="preprocessor">#endif</span>
<a name="l00828"></a>00828 <span class="preprocessor"></span><span class="preprocessor">#endif // Controller 7</span>
<a name="l00829"></a>00829 <span class="preprocessor"></span>
<a name="l00830"></a>00830 <span class="preprocessor">#if FEATURE_CONTROLLER==8 || FEATURE_CONTROLLER==9 // PiBot Expansion Port</span>
<a name="l00831"></a>00831 <span class="preprocessor"></span>
<a name="l00832"></a>00832 <span class="preprocessor">#define UI_HAS_KEYS 1</span>
<a name="l00833"></a>00833 <span class="preprocessor"></span><span class="preprocessor">#define UI_HAS_BACK_KEY 1</span>
<a name="l00834"></a>00834 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_TYPE 1</span>
<a name="l00835"></a>00835 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_CHARSET 1</span>
<a name="l00836"></a>00836 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00837"></a>00837 <span class="preprocessor"></span><span class="preprocessor">#define UI_INVERT_MENU_DIRECTION true</span>
<a name="l00838"></a>00838 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_SHORT_SEQUENCE 6,2 // Needs longer beep sequence</span>
<a name="l00839"></a>00839 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_LONG_SEQUENCE 24,8</span>
<a name="l00840"></a>00840 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_TYPE 1</span>
<a name="l00841"></a>00841 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_TYPE_INVERTING true</span>
<a name="l00842"></a>00842 <span class="preprocessor"></span>
<a name="l00843"></a>00843 <span class="preprocessor">#if FEATURE_CONTROLLER==9   // 16x02 Display</span>
<a name="l00844"></a>00844 <span class="preprocessor"></span><span class="preprocessor"> #define UI_COLS 16</span>
<a name="l00845"></a>00845 <span class="preprocessor"></span><span class="preprocessor"> #define UI_ROWS 2</span>
<a name="l00846"></a>00846 <span class="preprocessor"></span><span class="preprocessor">#else  ////20x04 Display</span>
<a name="l00847"></a>00847 <span class="preprocessor"></span><span class="preprocessor"> #define UI_COLS 20</span>
<a name="l00848"></a>00848 <span class="preprocessor"></span><span class="preprocessor"> #define UI_ROWS 4</span>
<a name="l00849"></a>00849 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00850"></a>00850 <span class="preprocessor"></span>
<a name="l00851"></a>00851 <span class="preprocessor">#ifdef PiBot_V_1_4</span>
<a name="l00852"></a>00852 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             31</span>
<a name="l00853"></a>00853 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      45</span>
<a name="l00854"></a>00854 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00855"></a>00855 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  44</span>
<a name="l00856"></a>00856 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      43</span>
<a name="l00857"></a>00857 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      42</span>
<a name="l00858"></a>00858 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      19</span>
<a name="l00859"></a>00859 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      18</span>
<a name="l00860"></a>00860 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      43</span>
<a name="l00861"></a>00861 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      42</span>
<a name="l00862"></a>00862 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      19</span>
<a name="l00863"></a>00863 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      18</span>
<a name="l00864"></a>00864 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           61</span>
<a name="l00865"></a>00865 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           62</span>
<a name="l00866"></a>00866 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       63</span>
<a name="l00867"></a>00867 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           28</span>
<a name="l00868"></a>00868 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00869"></a>00869 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_OK       49</span>
<a name="l00870"></a>00870 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_NEXT     48</span>
<a name="l00871"></a>00871 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_PREVIOUS 47</span>
<a name="l00872"></a>00872 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_BACK     46</span>
<a name="l00873"></a>00873 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_SD_PRINT 29</span>
<a name="l00874"></a>00874 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00875"></a>00875 <span class="preprocessor"></span><span class="preprocessor">#define BEEPER_PIN             37</span>
<a name="l00876"></a>00876 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RS_PIN      16</span>
<a name="l00877"></a>00877 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_RW_PIN      -1</span>
<a name="l00878"></a>00878 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_ENABLE_PIN  17</span>
<a name="l00879"></a>00879 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D0_PIN      23</span>
<a name="l00880"></a>00880 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D1_PIN      25</span>
<a name="l00881"></a>00881 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D2_PIN      27</span>
<a name="l00882"></a>00882 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D3_PIN      29</span>
<a name="l00883"></a>00883 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D4_PIN      23</span>
<a name="l00884"></a>00884 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D5_PIN      25</span>
<a name="l00885"></a>00885 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D6_PIN      27</span>
<a name="l00886"></a>00886 <span class="preprocessor"></span><span class="preprocessor">#define UI_DISPLAY_D7_PIN      29</span>
<a name="l00887"></a>00887 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_A           33</span>
<a name="l00888"></a>00888 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_B           31</span>
<a name="l00889"></a>00889 <span class="preprocessor"></span><span class="preprocessor">#define UI_ENCODER_CLICK       35</span>
<a name="l00890"></a>00890 <span class="preprocessor"></span><span class="preprocessor">#define UI_RESET_PIN           41</span>
<a name="l00891"></a>00891 <span class="preprocessor"></span><span class="preprocessor">#define UI_DELAYPERCHAR 320</span>
<a name="l00892"></a>00892 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_OK       4</span>
<a name="l00893"></a>00893 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_NEXT     6</span>
<a name="l00894"></a>00894 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_PREVIOUS 5</span>
<a name="l00895"></a>00895 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_BACK     11</span>
<a name="l00896"></a>00896 <span class="preprocessor"></span><span class="preprocessor">#define UI_BUTTON_SD_PRINT 42</span>
<a name="l00897"></a>00897 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00898"></a>00898 <span class="preprocessor"></span>
<a name="l00899"></a>00899 <span class="preprocessor">#ifdef UI_MAIN</span>
<a name="l00900"></a>00900 <span class="preprocessor"></span><span class="keywordtype">void</span> ui_init_keys() {
<a name="l00901"></a>00901   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_BUTTON_OK); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00902"></a>00902   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_BUTTON_NEXT);
<a name="l00903"></a>00903   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_BUTTON_PREVIOUS);
<a name="l00904"></a>00904   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_BUTTON_BACK);
<a name="l00905"></a>00905   <a class="code" href="ui_8h.html#a60cfc4ad20b7a6814ff8ab3c11faef8f">UI_KEYS_INIT_BUTTON_LOW</a>(UI_BUTTON_SD_PRINT);
<a name="l00906"></a>00906 }
<a name="l00907"></a>00907 <span class="keywordtype">void</span> ui_check_keys(<span class="keywordtype">int</span> &amp;action) {
<a name="l00908"></a>00908  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_BUTTON_OK,<a class="code" href="ui_8h.html#a404bc634b7ad57423b8b8412a531c583">UI_ACTION_OK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00909"></a>00909  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_BUTTON_NEXT,<a class="code" href="ui_8h.html#aaa4a7b89072ed573078be6dc3655e6b3">UI_ACTION_NEXT</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00910"></a>00910  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_BUTTON_PREVIOUS,<a class="code" href="ui_8h.html#a7d761251c7c0b55f7f7edb2a621f6d12">UI_ACTION_PREVIOUS</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00911"></a>00911  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_BUTTON_BACK,<a class="code" href="ui_8h.html#afaa185811886214a66718bbe7bf90da6">UI_ACTION_BACK</a>); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00912"></a>00912  <a class="code" href="ui_8h.html#a83566d1fbae4377cb445da2415c046ad">UI_KEYS_BUTTON_LOW</a>(UI_BUTTON_SD_PRINT,<a class="code" href="ui_8h.html#ae915626599ace17139e49669b86acb10">UI_ACTION_SD_PRINT</a> ); <span class="comment">// push button, connects gnd to pin</span>
<a name="l00913"></a>00913 }
<a name="l00914"></a>00914 <span class="keyword">inline</span> <span class="keywordtype">void</span> ui_check_slow_encoder() {}
<a name="l00915"></a>00915 <span class="keywordtype">void</span> ui_check_slow_keys(<span class="keywordtype">int</span> &amp;action) {}
<a name="l00916"></a>00916 <span class="preprocessor">#endif</span>
<a name="l00917"></a>00917 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00918"></a>00918 <span class="preprocessor"></span>
<a name="l00919"></a>00919 <span class="preprocessor">#if FEATURE_CONTROLLER&gt;0</span>
<a name="l00920"></a>00920 <span class="preprocessor"></span><span class="preprocessor">#if UI_ROWS==4</span>
<a name="l00921"></a>00921 <span class="preprocessor"></span><span class="preprocessor">#if UI_COLS==16</span>
<a name="l00922"></a>00922 <span class="preprocessor"></span><span class="preprocessor">#define UI_LINE_OFFSETS {0,0x40,0x10,0x50} // 4x16</span>
<a name="l00923"></a>00923 <span class="preprocessor"></span><span class="preprocessor">#elif UI_COLS==20</span>
<a name="l00924"></a>00924 <span class="preprocessor"></span><span class="comment">//#define UI_LINE_OFFSETS {0,0x20,0x40,0x60} // 4x20 with KS0073</span>
<a name="l00925"></a>00925 <span class="preprocessor">#define UI_LINE_OFFSETS {0,0x40,0x14,0x54} // 4x20 with HD44780</span>
<a name="l00926"></a>00926 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00927"></a>00927 <span class="preprocessor"></span><span class="preprocessor">#error Unknown combination off rows/columns - define UI_LINE_OFFSETS manually.</span>
<a name="l00928"></a>00928 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00929"></a>00929 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00930"></a>00930 <span class="preprocessor"></span><span class="preprocessor">#define UI_LINE_OFFSETS {0,0x40,0x10,0x50} // 2x16, 2x20, 2x24</span>
<a name="l00931"></a>00931 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00932"></a>00932 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="uilang_8h.html">uilang.h</a>&quot;</span>
<a name="l00933"></a>00933 <span class="preprocessor">#include &quot;<a class="code" href="uimenu_8h.html">uimenu.h</a>&quot;</span>
<a name="l00934"></a>00934 <span class="preprocessor">#endif</span>
<a name="l00935"></a>00935 <span class="preprocessor"></span>
<a name="l00936"></a><a class="code" href="ui_8h.html#aa1527d572e383125c201901703e396ff">00936</a> <span class="preprocessor">#define UI_VERSION_STRING &quot;Repetier &quot; REPETIER_VERSION</span>
<a name="l00937"></a>00937 <span class="preprocessor"></span>
<a name="l00938"></a>00938 <span class="preprocessor">#ifdef UI_HAS_I2C_KEYS</span>
<a name="l00939"></a>00939 <span class="preprocessor"></span><span class="preprocessor">#define COMPILE_I2C_DRIVER</span>
<a name="l00940"></a>00940 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00941"></a>00941 <span class="preprocessor"></span>
<a name="l00942"></a>00942 <span class="preprocessor">#if UI_DISPLAY_TYPE!=0</span>
<a name="l00943"></a>00943 <span class="preprocessor"></span>
<a name="l00944"></a>00944 
<a name="l00945"></a>00945 <span class="preprocessor">#if UI_DISPLAY_TYPE==3</span>
<a name="l00946"></a>00946 <span class="preprocessor"></span><span class="preprocessor">#define COMPILE_I2C_DRIVER</span>
<a name="l00947"></a>00947 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00948"></a>00948 <span class="preprocessor"></span>
<a name="l00949"></a>00949 <span class="preprocessor">#ifndef UI_TEMP_PRECISION</span>
<a name="l00950"></a>00950 <span class="preprocessor"></span><span class="preprocessor">#if UI_COLS&gt;16</span>
<a name="l00951"></a>00951 <span class="preprocessor"></span><span class="preprocessor">#define UI_TEMP_PRECISION 1</span>
<a name="l00952"></a>00952 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00953"></a>00953 <span class="preprocessor"></span><span class="preprocessor">#define UI_TEMP_PRECISION 0</span>
<a name="l00954"></a>00954 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00955"></a>00955 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00956"></a>00956 <span class="preprocessor"></span>
<a name="l00957"></a><a class="code" href="ui_8h.html#a38d368d3390d4992058f71ab15b7ceee">00957</a> <span class="preprocessor">#define UI_INITIALIZE uid.initialize();</span>
<a name="l00958"></a><a class="code" href="ui_8h.html#a8951268e57885ef77b2c132da53fe2bc">00958</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_FAST if(pwm_count &amp; 4) {uid.fastAction();}</span>
<a name="l00959"></a><a class="code" href="ui_8h.html#a08a44b00edfbc35a010da97d9f978cd7">00959</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_MEDIUM uid.mediumAction();</span>
<a name="l00960"></a><a class="code" href="ui_8h.html#a59f640c60ccd7221539b30f987cb081d">00960</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_SLOW uid.slowAction();</span>
<a name="l00961"></a><a class="code" href="ui_8h.html#ae9f33e20619525a88c3032ee2394d35a">00961</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS(status) uid.setStatusP(PSTR(status));</span>
<a name="l00962"></a><a class="code" href="ui_8h.html#a28bcf9fad0a3a05e1aacaab582489ea4">00962</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS_UPD(status) {uid.setStatusP(PSTR(status));uid.refreshPage();}</span>
<a name="l00963"></a><a class="code" href="ui_8h.html#a5a654e06f266992544b49f11f69278f3">00963</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS_RAM(status) uid.setStatus(status);</span>
<a name="l00964"></a><a class="code" href="ui_8h.html#ae27886dddb15e503bba28d7eab5f8a17">00964</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS_UPD_RAM(status) {uid.setStatus(status);uid.refreshPage();}</span>
<a name="l00965"></a><a class="code" href="ui_8h.html#a7341ad7ec5de617b6790928cf6259d2d">00965</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_ERROR(msg) {uid.errorMsg=(void*)PSTR(msg);pushMenu((void*)&amp;ui_menu_error,true);}</span>
<a name="l00966"></a><a class="code" href="ui_8h.html#a185334cb390d65f26afe58826ef22b79">00966</a> <span class="preprocessor"></span><span class="preprocessor">#define UI_CLEAR_STATUS {uid.statusMsg[0]=0;}</span>
<a name="l00967"></a>00967 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00968"></a>00968 <span class="preprocessor"></span><span class="preprocessor">#define UI_INITIALIZE {}</span>
<a name="l00969"></a>00969 <span class="preprocessor"></span><span class="preprocessor">#define UI_FAST {}</span>
<a name="l00970"></a>00970 <span class="preprocessor"></span><span class="preprocessor">#define UI_MEDIUM {}</span>
<a name="l00971"></a>00971 <span class="preprocessor"></span><span class="preprocessor">#define UI_SLOW {}</span>
<a name="l00972"></a>00972 <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS(status) {}</span>
<a name="l00973"></a>00973 <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS_UPD(status) {}</span>
<a name="l00974"></a>00974 <span class="preprocessor"></span><span class="preprocessor">#define UI_CLEAR_STATUS {}</span>
<a name="l00975"></a>00975 <span class="preprocessor"></span><span class="preprocessor">#define UI_ERROR(msg) {}</span>
<a name="l00976"></a>00976 <span class="preprocessor"></span><span class="preprocessor">#define UI_STATUS_UPD_RAM(status) {}</span>
<a name="l00977"></a>00977 <span class="preprocessor"></span><span class="preprocessor">#endif  // Display</span>
<a name="l00978"></a>00978 <span class="preprocessor"></span>
<a name="l00979"></a>00979 <span class="comment">// Beeper methods</span>
<a name="l00980"></a>00980 <span class="preprocessor">#if BEEPER_TYPE==0</span>
<a name="l00981"></a>00981 <span class="preprocessor"></span><span class="preprocessor">#define BEEP_SHORT {}</span>
<a name="l00982"></a>00982 <span class="preprocessor"></span><span class="preprocessor">#define BEEP_LONG {}</span>
<a name="l00983"></a>00983 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00984"></a><a class="code" href="ui_8h.html#ad21d5350c9813a1caabc8c3ee557ef31">00984</a> <span class="preprocessor"></span><span class="preprocessor">#define BEEP_SHORT beep(BEEPER_SHORT_SEQUENCE);</span>
<a name="l00985"></a><a class="code" href="ui_8h.html#a3073cfbf85171e628e3919243047aecc">00985</a> <span class="preprocessor"></span><span class="preprocessor">#define BEEP_LONG beep(BEEPER_LONG_SEQUENCE);</span>
<a name="l00986"></a>00986 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00987"></a>00987 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ui_8cpp.html#a4cdb62ccad20bd76e7ff3da83985b54d">beep</a>(uint8_t duration,uint8_t count);
<a name="l00988"></a>00988 
<a name="l00989"></a>00989 <span class="preprocessor">#endif</span>
<a name="l00990"></a>00990 <span class="preprocessor"></span>
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="ui_8h.html">ui.h</a>      </li>

    <li class="footer">Generated on Mon Dec 30 2013 18:53:02 for Repetier-Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
